> -----Original Message----- > From: Hannes Reinecke [mailto:h...@suse.de] > Sent: Wednesday, 01 October, 2014 1:23 AM > To: James Bottomley > Cc: Christoph Hellwig; linux-scsi@vger.kernel.org; Elliott, Robert (Server > Storage); Hannes Reinecke > Subject: [PATCH 12/24] scsi: use 'bool' as return value for > scsi_normalize_sense() > > Convert scsi_normalize_sense() and frieds to return 'bool' > instead of an integer.
frieds should be friends ... > -int scsi_command_normalize_sense(struct scsi_cmnd *cmd, > +bool scsi_command_normalize_sense(struct scsi_cmnd *cmd, > struct scsi_sense_hdr *sshdr) Add const for *cmd since what it points to is not modified. (prototype in scsi_eh.h) ... > -static inline int scsi_sense_valid(struct scsi_sense_hdr *sshdr) > +static inline bool scsi_sense_valid(struct scsi_sense_hdr *sshdr) > { > if (!sshdr) > - return 0; > + return false; > > return (sshdr->response_code & 0x70) == 0x70; > } Add const to the argument, since what it points to is not changed by this function: const struct scsi_sense_hdr *sshdr > -static inline int scsi_sense_is_deferred(struct scsi_sense_hdr *sshdr) > +static inline bool scsi_sense_is_deferred(struct scsi_sense_hdr *sshdr) > { > return ((sshdr->response_code >= 0x70) && (sshdr->response_code & 1)); > } Add const to the argument, since what it points to is not changed by this function: const struct scsi_sense_hdr *sshdr (also mentioned in reply to PATCH 4) --- Rob Elliott HP Server Storage -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html