On 4/23/21 4:39 AM, Hannes Reinecke wrote: > +static inline unsigned char get_status_byte(struct scsi_cmnd *cmd) > +{ > + return cmd->result & 0xff; > +} > + > static inline void set_msg_byte(struct scsi_cmnd *cmd, char status) > { > cmd->result = (cmd->result & 0xffff00ff) | (status << 8); > @@ -326,6 +331,11 @@ static inline void set_host_byte(struct scsi_cmnd *cmd, char status) > cmd->result = (cmd->result & 0xff00ffff) | (status << 16); > } > > +static inline unsigned char get_host_byte(struct scsi_cmnd *cmd) > +{ > + return (cmd->result >> 16) & 0xff; > +} How about using 'u8' instead of 'unsigned char' to make it more clear that the returned value is an integer instead of a character? Anyway: Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>