diff options
author | Nilesh Javali <njavali@marvell.com> | 2022-07-13 07:20:43 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-07-19 04:33:04 +0200 |
commit | 166d74b876b7d8eb2e41b0587db93d23cef85221 (patch) | |
tree | cfcacaea33b54ab0311a5b15f2ada5f2b3a7381e /drivers | |
parent | scsi: qla2xxx: Fix discovery issues in FC-AL topology (diff) | |
download | linux-166d74b876b7d8eb2e41b0587db93d23cef85221.tar.xz linux-166d74b876b7d8eb2e41b0587db93d23cef85221.zip |
scsi: qla2xxx: Fix sparse warning for dport_data
Use le16_to_cpu to fix sparse warning reported for dport_data.
sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/qla2xxx/qla_bsg.c:2485:34: sparse: sparse: incorrect
>> type in assignment (different base types) @@ expected unsigned
>> short [usertype] mbx1 @@ got restricted __le16 @@
drivers/scsi/qla2xxx/qla_bsg.c:2485:34: sparse: expected unsigned short [usertype] mbx1
drivers/scsi/qla2xxx/qla_bsg.c:2485:34: sparse: got restricted __le16
>> drivers/scsi/qla2xxx/qla_bsg.c:2486:34: sparse: sparse:
>> incorrect type in assignment (different base types) @@
>> expected unsigned short [usertype] mbx2 @@ got restricted __le16 @@
drivers/scsi/qla2xxx/qla_bsg.c:2486:34: sparse: expected unsigned short [usertype] mbx2
drivers/scsi/qla2xxx/qla_bsg.c:2486:34: sparse: got restricted __le16
Link: https://lore.kernel.org/r/20220713052045.10683-9-njavali@marvell.com
Fixes: 476da8faa336 ("scsi: qla2xxx: Add a new v2 dport diagnostic feature")
Cc: stable@vger.kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_bsg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index 299c5cba92f4..5db9bf69dcff 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c @@ -2482,8 +2482,8 @@ qla2x00_do_dport_diagnostics_v2(struct bsg_job *bsg_job) dd->mbx2 = mcp->mb[1]; vha->dport_status |= DPORT_DIAG_IN_PROGRESS; } else if (options == QLA_GET_DPORT_RESULT_V2) { - dd->mbx1 = vha->dport_data[1]; - dd->mbx2 = vha->dport_data[2]; + dd->mbx1 = le16_to_cpu(vha->dport_data[1]); + dd->mbx2 = le16_to_cpu(vha->dport_data[2]); } } else { dd->mbx1 = mcp->mb[0]; |