diff options
author | Hannes Reinecke <hare@suse.de> | 2014-10-24 08:26:52 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-12 05:16:01 -0500 |
commit | 4753cbc0a1286a60d2f859a7056f8e4873f494c8 (patch) | |
tree | e2cc77143603f22653a7fc1c7873f0ab67cc5d42 /include | |
parent | 15c75f8a6d570e1d22594fe7f1cdb45360651a60 (diff) |
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')
-rw-r--r-- | include/scsi/scsi_eh.h | 14 |
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 */ | |||
27 | u8 additional_length; /* always 0 for fixed sense format */ | 27 | u8 additional_length; /* always 0 for fixed sense format */ |
28 | }; | 28 | }; |
29 | 29 | ||
30 | static inline int scsi_sense_valid(struct scsi_sense_hdr *sshdr) | 30 | static inline bool scsi_sense_valid(const struct scsi_sense_hdr *sshdr) |
31 | { | 31 | { |
32 | if (!sshdr) | 32 | if (!sshdr) |
33 | return 0; | 33 | return false; |
34 | 34 | ||
35 | return (sshdr->response_code & 0x70) == 0x70; | 35 | return (sshdr->response_code & 0x70) == 0x70; |
36 | } | 36 | } |
@@ -42,12 +42,12 @@ extern void scsi_eh_flush_done_q(struct list_head *done_q); | |||
42 | extern void scsi_report_bus_reset(struct Scsi_Host *, int); | 42 | extern void scsi_report_bus_reset(struct Scsi_Host *, int); |
43 | extern void scsi_report_device_reset(struct Scsi_Host *, int, int); | 43 | extern void scsi_report_device_reset(struct Scsi_Host *, int, int); |
44 | extern int scsi_block_when_processing_errors(struct scsi_device *); | 44 | extern int scsi_block_when_processing_errors(struct scsi_device *); |
45 | extern int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, | 45 | extern bool scsi_normalize_sense(const u8 *sense_buffer, int sb_len, |
46 | struct scsi_sense_hdr *sshdr); | 46 | struct scsi_sense_hdr *sshdr); |
47 | extern int scsi_command_normalize_sense(struct scsi_cmnd *cmd, | 47 | extern bool scsi_command_normalize_sense(const struct scsi_cmnd *cmd, |
48 | struct scsi_sense_hdr *sshdr); | 48 | struct scsi_sense_hdr *sshdr); |
49 | 49 | ||
50 | static inline int scsi_sense_is_deferred(const struct scsi_sense_hdr *sshdr) | 50 | static inline bool scsi_sense_is_deferred(const struct scsi_sense_hdr *sshdr) |
51 | { | 51 | { |
52 | return ((sshdr->response_code >= 0x70) && (sshdr->response_code & 1)); | 52 | return ((sshdr->response_code >= 0x70) && (sshdr->response_code & 1)); |
53 | } | 53 | } |