From 2908769c35fbd3de7b874b60b95ba81546e3c920 Mon Sep 17 00:00:00 2001 From: Damien Le Moal Date: Mon, 24 Apr 2017 16:51:12 +0900 Subject: 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 Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen --- include/scsi/scsi_eh.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/scsi') 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 *); -- cgit v1.2.1