Skip to contentSkip to conversation

FAILED: patch "[PATCH] scsi: qla2xxx: Fix sparse warning for dport_data" failed to apply to 5.18-stable tree

PATCH [email protected] 1 participant 1 message Aug 14, 2022

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.18-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 166d74b876b7d8eb2e41b0587db93d23cef85221 Mon Sep 17 00:00:00 2001
From: Nilesh Javali <[email protected]>
Date: Tue, 12 Jul 2022 22:20:43 -0700
Subject: [PATCH] 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 >>)

Quoted 3 lines
Quoted 3 lines

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
Quoted 3 lines
Quoted 3 lines

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

drivers/scsi/qla2xxx/qla_bsg.c +2 -2
index 299c5cba92f4..5db9bf69dcff 100644
@@ -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];