From: "Madhani, Himanshu" <Himanshu.Madhani@cavium.com>
To: James Bottomley <jejb@linux.vnet.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Dept-Eng QLA2xxx Upstream <qla2xxx-upstream@cavium.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"Trapp, Darren" <Darren.Trapp@cavium.com>,
"Malavali, Giridhar" <Giridhar.Malavali@cavium.com>,
"Grigsby, Duane" <Duane.Grigsby@cavium.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] scsi: qla2xxx: remove incorrect byte swap
Date: Fri, 30 Jun 2017 17:00:12 +0000 [thread overview]
Message-ID: <F97DB636-CF5B-4612-9127-FD9D38AE5BF4@cavium.com> (raw)
In-Reply-To: <1498840917.8086.3.camel@linux.vnet.ibm.com>
> On Jun 30, 2017, at 9:41 AM, James Bottomley <jejb@linux.vnet.ibm.com> wrote:
>
> On Fri, 2017-06-30 at 18:10 +0200, Arnd Bergmann wrote:
>> cont_pkt->entry_type is an 8-bit field, so doing a 32-bit byteswap
>> on it will store incorrect data:
>>
>> drivers/scsi/qla2xxx/qla_nvme.c: In function 'qla2x00_start_nvme_mq':
>> include/uapi/linux/byteorder/big_endian.h:32:26: error: large integer
>> implicitly truncated to unsigned type [-Werror=overflow]
>> drivers/scsi/qla2xxx/qla_nvme.c:444:27: note: in expansion of macro
>> 'cpu_to_le32'
>> cont_pkt->entry_type = cpu_to_le32(CONTINUE_A64_TYPE);
>>
>> This removes the erroneous cpu_to_le32().
>>
>> Fixes: e84067d74301 ("scsi: qla2xxx: Add FC-NVMe F/W initialization
>> and transport registration")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>> drivers/scsi/qla2xxx/qla_nvme.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/scsi/qla2xxx/qla_nvme.c
>> b/drivers/scsi/qla2xxx/qla_nvme.c
>> index 1da8fa8f641d..14e25e32e622 100644
>> --- a/drivers/scsi/qla2xxx/qla_nvme.c
>> +++ b/drivers/scsi/qla2xxx/qla_nvme.c
>> @@ -441,7 +441,7 @@ static int qla2x00_start_nvme_mq(srb_t *sp)
>> req->ring_ptr++;
>> }
>> cont_pkt = (cont_a64_entry_t *)req-
>>> ring_ptr;
>> - cont_pkt->entry_type =
>> cpu_to_le32(CONTINUE_A64_TYPE);
>> + cont_pkt->entry_type = CONTINUE_A64_TYPE;
>>
>
> We already have a patch proposed for this, but I think it may be wrong
> (it's the same as yours, so yours may be wrong too) see the handling in
> qla_iocb.c
>
> James
I will send patch which has correct usage in qla_iocb.c shortly.
Thanks,
- Himanshu
prev parent reply other threads:[~2017-06-30 17:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-30 16:10 Arnd Bergmann
2017-06-30 16:10 ` [PATCH 2/2] scsi: qla2xxx: avoid unused-function warning Arnd Bergmann
2017-06-30 23:54 ` Madhani, Himanshu
2017-07-01 21:15 ` Martin K. Petersen
2017-06-30 16:41 ` [PATCH 1/2] scsi: qla2xxx: remove incorrect byte swap James Bottomley
2017-06-30 17:00 ` Madhani, Himanshu [this message]
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=F97DB636-CF5B-4612-9127-FD9D38AE5BF4@cavium.com \
--to=himanshu.madhani@cavium.com \
--cc=Darren.Trapp@cavium.com \
--cc=Duane.Grigsby@cavium.com \
--cc=Giridhar.Malavali@cavium.com \
--cc=arnd@arndb.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=qla2xxx-upstream@cavium.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
all inboxes | Powered by JetHome®