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>
This commit is contained in:

committed by
Martin K. Petersen

orang tua
d227ec267f
melakukan
2908769c35
@@ -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 *);
|
||||
|
||||
|
Reference in New Issue
Block a user