On Tue, Sep 24, 2019 at 1:21 AM Bart Van Assche <bvanassche@xxxxxxx> wrote: > > On 6/20/19 8:03 AM, Jack Wang wrote: > > +static inline const char *ibtrs_srv_state_str(enum ibtrs_srv_state state) > > +{ > > + switch (state) { > > + case IBTRS_SRV_CONNECTING: > > + return "IBTRS_SRV_CONNECTING"; > > + case IBTRS_SRV_CONNECTED: > > + return "IBTRS_SRV_CONNECTED"; > > + case IBTRS_SRV_CLOSING: > > + return "IBTRS_SRV_CLOSING"; > > + case IBTRS_SRV_CLOSED: > > + return "IBTRS_SRV_CLOSED"; > > + default: > > + return "UNKNOWN"; > > + } > > +} > > Since this function is not in the hot path, please move it into a .c file. Ok. > > > +/* See ibtrs-log.h */ > > +#define TYPES_TO_SESSNAME(obj) \ > > + LIST(CASE(obj, struct ibtrs_srv_sess *, s.sessname)) > > Please remove this macro and pass 'sessname' explicitly to logging > functions. Ok. > > Thanks, > > Bart. Thanks!