From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>,
"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>
Cc: linux-scsi@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
Arun Easi <aeasi@marvell.com>,
Nilesh Javali <njavali@marvell.com>,
Daniel Wagner <dwagner@suse.de>,
Himanshu Madhani <himanshu.madhani@oracle.com>,
Hannes Reinecke <hare@suse.de>, Martin Wilck <mwilck@suse.com>,
Roman Bolshakov <r.bolshakov@yadro.com>
Subject: [PATCH v5 13/15] qla2xxx: Use make_handle() instead of open-coding it
Date: Mon, 11 May 2020 13:09:44 -0700 [thread overview]
Message-ID: <20200511200946.7675-14-bvanassche@acm.org> (raw)
In-Reply-To: <20200511200946.7675-1-bvanassche@acm.org>
Cc: Arun Easi <aeasi@marvell.com>
Cc: Nilesh Javali <njavali@marvell.com>
Cc: Daniel Wagner <dwagner@suse.de>
Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
drivers/scsi/qla2xxx/qla_isr.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 87d0f5e4d81a..0a9a838c7f20 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -819,7 +819,7 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
goto skip_rio;
switch (mb[0]) {
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;
break;
case MBA_CMPLT_1_16BIT:
@@ -858,10 +858,10 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
mb[0] = MBA_SCSI_COMPLETION;
break;
case MBA_CMPLT_2_32BIT:
- handles[0] = le32_to_cpu((uint32_t)((mb[2] << 16) | mb[1]));
- handles[1] = le32_to_cpu(
- ((uint32_t)(RD_MAILBOX_REG(ha, reg, 7) << 16)) |
- RD_MAILBOX_REG(ha, reg, 6));
+ handles[0] = le32_to_cpu(make_handle(mb[2], mb[1]));
+ handles[1] =
+ le32_to_cpu(make_handle(RD_MAILBOX_REG(ha, reg, 7),
+ RD_MAILBOX_REG(ha, reg, 6)));
handle_cnt = 2;
mb[0] = MBA_SCSI_COMPLETION;
break;
next prev parent reply other threads:[~2020-05-11 20:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 20:09 [PATCH v5 00/15] Fix qla2xxx endianness annotations Bart Van Assche
2020-05-11 20:09 ` [PATCH v5 01/15] qla2xxx: Fix spelling of a variable name Bart Van Assche
2020-05-11 20:09 ` [PATCH v5 02/15] qla2xxx: Suppress two recently introduced compiler warnings Bart Van Assche
2020-05-11 20:09 ` [PATCH v5 03/15] qla2xxx: Simplify the functions for dumping firmware Bart Van Assche
2020-05-11 20:09 ` [PATCH v5 04/15] qla2xxx: Sort BUILD_BUG_ON() statements alphabetically Bart Van Assche
2020-05-11 20:09 ` [PATCH v5 05/15] qla2xxx: Add more BUILD_BUG_ON() statements Bart Van Assche
2020-05-11 20:09 ` [PATCH v5 06/15] qla2xxx: Make a gap in struct qla2xxx_offld_chain explicit Bart Van Assche
2020-05-11 20:09 ` [PATCH v5 07/15] qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE Bart Van Assche
2020-05-11 20:09 ` [PATCH v5 08/15] qla2xxx: Change two hardcoded constants into offsetof() / sizeof() expressions Bart Van Assche
2020-05-11 20:09 ` [PATCH v5 09/15] qla2xxx: Use register names instead of register offsets Bart Van Assche
2020-05-12 6:11 ` Hannes Reinecke
2020-05-11 20:09 ` [PATCH v5 10/15] qla2xxx: Fix the code that reads from mailbox registers Bart Van Assche
2020-05-12 6:17 ` Hannes Reinecke
2020-05-12 15:55 ` Bart Van Assche
2020-05-11 20:09 ` [PATCH v5 11/15] qla2xxx: Change {RD,WRT}_REG_*() function names from upper case into lower case Bart Van Assche
2020-05-11 20:09 ` [PATCH v5 12/15] qla2xxx: Cast explicitly to uint16_t / uint32_t Bart Van Assche
2020-05-12 6:13 ` Hannes Reinecke
2020-05-11 20:09 ` Bart Van Assche [this message]
2020-05-11 20:09 ` [PATCH v5 14/15] qla2xxx: Fix endianness annotations in header files Bart Van Assche
2020-05-11 20:09 ` [PATCH v5 15/15] qla2xxx: Fix endianness annotations in source files Bart Van Assche
2020-05-12 16:44 ` [PATCH v5 00/15] Fix qla2xxx endianness annotations Martin K. Petersen
2020-05-13 1:29 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200511200946.7675-14-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=aeasi@marvell.com \
--cc=dwagner@suse.de \
--cc=hare@suse.de \
--cc=himanshu.madhani@oracle.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mwilck@suse.com \
--cc=njavali@marvell.com \
--cc=r.bolshakov@yadro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox