Commit 2a4b684a authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: qla2xxx: Use make_handle() instead of open-coding it

Link: https://lore.kernel.org/r/20200518211712.11395-14-bvanassche@acm.org
Cc: Arun Easi <aeasi@marvell.com>
Cc: Nilesh Javali <njavali@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarDaniel Wagner <dwagner@suse.de>
Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: default avatarRoman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ab053c09
...@@ -819,7 +819,7 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) ...@@ -819,7 +819,7 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
goto skip_rio; goto skip_rio;
switch (mb[0]) { switch (mb[0]) {
case MBA_SCSI_COMPLETION: case MBA_SCSI_COMPLETION:
handles[0] = le32_to_cpu((uint32_t)((mb[2] << 16) | mb[1])); handles[0] = le32_to_cpu(make_handle(mb[2], mb[1]));
handle_cnt = 1; handle_cnt = 1;
break; break;
case MBA_CMPLT_1_16BIT: case MBA_CMPLT_1_16BIT:
...@@ -858,10 +858,10 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) ...@@ -858,10 +858,10 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
mb[0] = MBA_SCSI_COMPLETION; mb[0] = MBA_SCSI_COMPLETION;
break; break;
case MBA_CMPLT_2_32BIT: case MBA_CMPLT_2_32BIT:
handles[0] = le32_to_cpu((uint32_t)((mb[2] << 16) | mb[1])); handles[0] = le32_to_cpu(make_handle(mb[2], mb[1]));
handles[1] = le32_to_cpu( handles[1] =
((uint32_t)(RD_MAILBOX_REG(ha, reg, 7) << 16)) | le32_to_cpu(make_handle(RD_MAILBOX_REG(ha, reg, 7),
RD_MAILBOX_REG(ha, reg, 6)); RD_MAILBOX_REG(ha, reg, 6)));
handle_cnt = 2; handle_cnt = 2;
mb[0] = MBA_SCSI_COMPLETION; mb[0] = MBA_SCSI_COMPLETION;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment