On 4/26/21 5:47 AM, Bart Van Assche wrote: > 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> > I like it; 'unsigned char' is more in-line with the overall coding style, but is quite lengthy and cumbersome. Will be changing it for the next round. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@xxxxxxx +49 911 74053 688 SUSE Software Solutions Germany GmbH, 90409 Nürnberg GF: F. Imendörffer, HRB 36809 (AG Nürnberg)