On Mon, 2017-04-10 at 22:18 -0300, Mauricio Faria de Oliveira wrote: > /* > + * alua_state_remains - Whether a RTPG state remains the same across 2 values. > + * @state: the state value to check for. > + * @old_state: the old state value. > + * @new_state: the new state value. > + */ > +static bool alua_state_remains(int state, int old_state, int new_state) > +{ > + return ((old_state == state) && (new_state == state)); > +} Hello Mauricio, All parentheses in the return statement are superfluous. Please consider removing these. > +/* > - alua_rtpg_print(sdev, pg, &valid_states); > + > + /* Print RTPG information (except if state remains 'unavailable'). */ > + if (likely(!alua_state_remains(SCSI_ACCESS_STATE_UNAVAILABLE, > + orig_state, pg->state))) > + alua_rtpg_print(sdev, pg, &valid_states); Using "likely()" may prevent the CPU branch predictor to do it's work so in kernel code usually likely() is only used in code that is in the hot path. Thanks, Bart.