diff mbox series

scsi: qedi: Fix an endian bug in qedi_ring_doorbell

Message ID 20231117080151.1825970-1-chentao@kylinos.cn (mailing list archive)
State New, archived
Headers show
Series scsi: qedi: Fix an endian bug in qedi_ring_doorbell | expand

Commit Message

Kunwu Nov. 17, 2023, 8:01 a.m. UTC
drivers/scsi/qedi/qedi_fw.c:932:40: sparse: sparse: incorrect type in
assignment (different base types) expected restricted __le16
[usertype] sq_prod got unsigned short [usertype] fw_sq_prod_idx

Cc: stable@vger.kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202311161351.7sPcpket-lkp@intel.com/
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
 drivers/scsi/qedi/qedi_fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c
index 6901738324da..72da9dce4e6f 100644
--- a/drivers/scsi/qedi/qedi_fw.c
+++ b/drivers/scsi/qedi/qedi_fw.c
@@ -922,7 +922,7 @@  void qedi_fp_process_cqes(struct qedi_work *work)
 
 static void qedi_ring_doorbell(struct qedi_conn *qedi_conn)
 {
-	qedi_conn->ep->db_data.sq_prod = qedi_conn->ep->fw_sq_prod_idx;
+	qedi_conn->ep->db_data.sq_prod = cpu_to_le16(qedi_conn->ep->fw_sq_prod_idx);
 
 	/* wmb - Make sure fw idx is coherent */
 	wmb();