diff options
author | Hannes Reinecke <hare@suse.de> | 2014-10-24 14:26:52 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-12 11:16:01 +0100 |
commit | 4753cbc0a1286a60d2f859a7056f8e4873f494c8 (patch) | |
tree | e2cc77143603f22653a7fc1c7873f0ab67cc5d42 /drivers/scsi | |
parent | 15c75f8a6d570e1d22594fe7f1cdb45360651a60 (diff) | |
download | op-kernel-dev-4753cbc0a1286a60d2f859a7056f8e4873f494c8.zip op-kernel-dev-4753cbc0a1286a60d2f859a7056f8e4873f494c8.tar.gz |
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 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_error.c | 16 | ||||
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 0084f0b..ab570f5 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -2422,20 +2422,20 @@ EXPORT_SYMBOL(scsi_reset_provider); * responded to a SCSI command with the CHECK_CONDITION status. * * Return value: - * 1 if valid sense data information found, else 0; + * true if valid sense data information found, else false; */ -int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, - struct scsi_sense_hdr *sshdr) +bool scsi_normalize_sense(const u8 *sense_buffer, int sb_len, + struct scsi_sense_hdr *sshdr) { if (!sense_buffer || !sb_len) - return 0; + return false; memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); sshdr->response_code = (sense_buffer[0] & 0x7f); if (!scsi_sense_valid(sshdr)) - return 0; + return false; if (sshdr->response_code >= 0x72) { /* @@ -2465,12 +2465,12 @@ int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, } } - return 1; + return true; } EXPORT_SYMBOL(scsi_normalize_sense); -int scsi_command_normalize_sense(struct scsi_cmnd *cmd, - struct scsi_sense_hdr *sshdr) +bool scsi_command_normalize_sense(const struct scsi_cmnd *cmd, + struct scsi_sense_hdr *sshdr) { return scsi_normalize_sense(cmd->sense_buffer, SCSI_SENSE_BUFFERSIZE, sshdr); diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 3c96e39..30f51c1 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -831,7 +831,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) struct request *req = cmd->request; int error = 0; struct scsi_sense_hdr sshdr; - int sense_valid = 0; + bool sense_valid = false; int sense_deferred = 0; enum {ACTION_FAIL, ACTION_REPREP, ACTION_RETRY, ACTION_DELAYED_RETRY} action; |