From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Himanshu Madhani <himanshu.madhani@cavium.com>,
martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] qla2xxx: Fix compile warning
Date: Wed, 28 Jun 2017 15:12:08 -0700 [thread overview]
Message-ID: <1498687928.2769.20.camel@HansenPartnership.com> (raw)
In-Reply-To: <20170628220026.5706-1-himanshu.madhani@cavium.com>
On Wed, 2017-06-28 at 15:00 -0700, Himanshu Madhani wrote:
> Fixes following warning
>
> drivers/scsi/qla2xxx/qla_nvme.c: In function 'qla2x00_start_nvme_mq':
> include/uapi/linux/byteorder/big_endian.h:32:26: warning: large
> integer
> implicitly truncated to unsigned type [-Woverflow]
> #define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
> ---
> 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;
>
Well the code is definitely buggy, because it will load 0 on a BE
system. However, are you sure this is the right fix? I thought the
qlogic engine did groups of 32 bit words, which is why the pre-nvme
code loads this field as:
*((uint32_t *)(&cont_pkt->entry_type)) = cpu_to_le32(CONTINUE_TYPE);
James
next prev parent reply other threads:[~2017-06-28 22:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 22:00 [PATCH] qla2xxx: Fix compile warning Himanshu Madhani
2017-06-28 22:12 ` James Bottomley [this message]
2017-06-28 23:03 ` Madhani, Himanshu
-- strict thread matches above, loose matches on Subject: below --
2017-06-30 23:56 Himanshu Madhani
2017-07-01 0:10 ` James Bottomley
2017-06-06 20:55 Himanshu Madhani
2017-06-13 1:14 ` Martin K. Petersen
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=1498687928.2769.20.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=himanshu.madhani@cavium.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.