aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2014-10-24 14:26:52 +0200
committerChristoph Hellwig <hch@lst.de>2014-11-12 11:16:01 +0100
commit4753cbc0a1286a60d2f859a7056f8e4873f494c8 (patch)
treee2cc77143603f22653a7fc1c7873f0ab67cc5d42 /include/scsi
parentscsi: do not decode sense extras (diff)
downloadlinux-dev-4753cbc0a1286a60d2f859a7056f8e4873f494c8.tar.xz
linux-dev-4753cbc0a1286a60d2f859a7056f8e4873f494c8.zip
scsi: use 'bool' as return value for scsi_normalize_sense()
Convert scsi_normalize_sense() and friends to return 'bool' instead of an integer. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Robert Elliott <elliott@hp.com> Reviewed-by: Yoshihiro Yunomae <yoshihiro.yunomae.ez@hitachi.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_eh.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h
index 5e598f01143c..256248141322 100644
--- a/include/scsi/scsi_eh.h
+++ b/include/scsi/scsi_eh.h
@@ -27,10 +27,10 @@ struct scsi_sense_hdr { /* See SPC-3 section 4.5 */
u8 additional_length; /* always 0 for fixed sense format */
};
-static inline int scsi_sense_valid(struct scsi_sense_hdr *sshdr)
+static inline bool scsi_sense_valid(const struct scsi_sense_hdr *sshdr)
{
if (!sshdr)
- return 0;
+ return false;
return (sshdr->response_code & 0x70) == 0x70;
}
@@ -42,12 +42,12 @@ extern void scsi_eh_flush_done_q(struct list_head *done_q);
extern void scsi_report_bus_reset(struct Scsi_Host *, int);
extern void scsi_report_device_reset(struct Scsi_Host *, int, int);
extern int scsi_block_when_processing_errors(struct scsi_device *);
-extern int scsi_normalize_sense(const u8 *sense_buffer, int sb_len,
- struct scsi_sense_hdr *sshdr);
-extern int scsi_command_normalize_sense(struct scsi_cmnd *cmd,
- struct scsi_sense_hdr *sshdr);
+extern bool scsi_normalize_sense(const u8 *sense_buffer, int sb_len,
+ struct scsi_sense_hdr *sshdr);
+extern bool scsi_command_normalize_sense(const struct scsi_cmnd *cmd,
+ struct scsi_sense_hdr *sshdr);
-static inline int scsi_sense_is_deferred(const struct scsi_sense_hdr *sshdr)
+static inline bool scsi_sense_is_deferred(const struct scsi_sense_hdr *sshdr)
{
return ((sshdr->response_code >= 0x70) && (sshdr->response_code & 1));
}