diff options
author | Damien Le Moal <damien.lemoal@wdc.com> | 2017-04-24 10:51:12 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-04-25 20:00:56 +0300 |
commit | 2908769c35fbd3de7b874b60b95ba81546e3c920 (patch) | |
tree | 9bde4e27970ce851070a4b2b3daf6bb7eaed388f /include/scsi/scsi_eh.h | |
parent | d227ec267ff4fa91ac2db9965d5392cf825be511 (diff) | |
download | linux-2908769c35fbd3de7b874b60b95ba81546e3c920.tar.xz |
scsi: Improve scsi_get_sense_info_fld
Use get_unaligned_be32 and get_unaligned_be64 to obtain values from the
sense buffer instead of open coding the operations. Also change the
function return value to a bool and fix the function signature
declaration to remove spaces triggering checkpatch warnings.
No functional change is introduced by this patch.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi/scsi_eh.h')
-rw-r--r-- | include/scsi/scsi_eh.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index a25b3285dd6f..64d30d80dadb 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h @@ -23,8 +23,8 @@ static inline bool scsi_sense_is_deferred(const struct scsi_sense_hdr *sshdr) return ((sshdr->response_code >= 0x70) && (sshdr->response_code & 1)); } -extern int scsi_get_sense_info_fld(const u8 * sense_buffer, int sb_len, - u64 * info_out); +extern bool scsi_get_sense_info_fld(const u8 *sense_buffer, int sb_len, + u64 *info_out); extern int scsi_ioctl_reset(struct scsi_device *, int __user *); |