[PATCH] scsi: qedi: Fix an endian bug in qedi_ring_doorbell

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/r/202311161351.7sPcpket-lkp@xxxxxxxxx/
Signed-off-by: Kunwu Chan <chentao@xxxxxxxxxx>
---
 drivers/scsi/qedi/qedi_fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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();
-- 
2.34.1




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux