diff options
author | Bart Van Assche <bvanassche@acm.org> | 2019-12-18 16:50:50 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-01-02 21:53:31 -0500 |
commit | a9c4ae108610716140bdec56ae0bebbe1c5cbe49 (patch) | |
tree | 4f1d832063a377fb470804a476cf7e9a0d2c4ca3 /drivers/scsi/qla2xxx/qla_target.h | |
parent | 3f5f7335e5e234e340b48ecb24c2aba98a61f934 (diff) |
scsi: qla2xxx: Use get_unaligned_*() instead of open-coding these functions
This patch improves readability and does not change any functionality.
Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Quinn Tran <qutran@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Daniel Wagner <dwagner@suse.de>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Link: https://lore.kernel.org/r/20191219005050.40193-1-bvanassche@acm.org
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_target.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h index d006f0a97b8c..6539499e9e95 100644 --- a/drivers/scsi/qla2xxx/qla_target.h +++ b/drivers/scsi/qla2xxx/qla_target.h @@ -379,8 +379,7 @@ static inline int get_datalen_for_atio(struct atio_from_isp *atio) { int len = atio->u.isp24.fcp_cmnd.add_cdb_len; - return (be32_to_cpu(get_unaligned((uint32_t *) - &atio->u.isp24.fcp_cmnd.add_cdb[len * 4]))); + return get_unaligned_be32(&atio->u.isp24.fcp_cmnd.add_cdb[len * 4]); } #define CTIO_TYPE7 0x12 /* Continue target I/O entry (for 24xx) */ |