diff mbox

[1/2] qla2xxx: Fix warning reported for req_que_no in qla24xx_async_cmd()

Message ID 20180122200420.19516-2-himanshu.madhani@cavium.com (mailing list archive)
State Accepted
Headers show

Commit Message

Madhani, Himanshu Jan. 22, 2018, 8:04 p.m. UTC
This patch fixes following sparse warning

drivers/scsi/qla2xxx/qla_init.c:1570:44: sparse: incorrect type in assignment
(different base types)

Fixes: 07a21872cf2b ("scsi: qla2xxx: Fix queue ID for async abort with Multiqueue")
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
---
 drivers/scsi/qla2xxx/qla_init.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Martin K. Petersen Jan. 23, 2018, 1:04 a.m. UTC | #1
Himanshu,

> This patch fixes following sparse warning
>
> drivers/scsi/qla2xxx/qla_init.c:1570:44: sparse: incorrect type in assignment
> (different base types)

Amended the original commit. Thanks!
diff mbox

Patch

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 27e67f7ae18a..5b6f3c53fdcf 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1567,9 +1567,10 @@  qla24xx_async_abort_cmd(srb_t *cmd_sp)
 	abt_iocb->u.abt.cmd_hndl = cmd_sp->handle;
 
 	if (vha->flags.qpairs_available && cmd_sp->qpair)
-		abt_iocb->u.abt.req_que_no = cmd_sp->qpair->req->id;
+		abt_iocb->u.abt.req_que_no =
+		    cpu_to_le16(cmd_sp->qpair->req->id);
 	else
-		abt_iocb->u.abt.req_que_no = vha->req->id;
+		abt_iocb->u.abt.req_que_no = cpu_to_le16(vha->req->id);
 
 	sp->done = qla24xx_abort_sp_done;
 	abt_iocb->timeout = qla24xx_abort_iocb_timeout;