All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Joe Perches <joe@perches.com>
Cc: qla2xxx-upstream@qlogic.com, jejb@linux.vnet.ibm.com,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, Himanshu.Madhani@cavium.com,
	Bart.VanAssche@sandisk.com
Subject: Re: [PATCH] scsi/qla2xxx: label endian-ness for many fields
Date: Sun, 11 Dec 2016 04:02:07 +0200	[thread overview]
Message-ID: <20161211035822-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1481348968.5946.48.camel@perches.com>

On Fri, Dec 09, 2016 at 09:49:28PM -0800, Joe Perches wrote:
> On Fri, 2016-12-09 at 22:45 +0200, Michael S. Tsirkin wrote:
> > This adds endian-ness labels for lots of qla structs.
> > Doing this cuts down number of sparse warnings from ~1700 to ~1400.
> > Will help find and resolve some of real issues down the road.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > 
> > ---
> > 
> > Compile-tested only.
> > 
> > diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
> > index 73b12e4..a4d3071 100644
> > --- a/drivers/scsi/qla2xxx/qla_def.h
> > +++ b/drivers/scsi/qla2xxx/qla_def.h
> > @@ -1159,28 +1159,28 @@ typedef struct {
> >  	 */
> >  	uint8_t  firmware_options[2];
> >  
> > -	uint16_t frame_payload_size;
> > -	uint16_t max_iocb_allocation;
> > -	uint16_t execution_throttle;
> > +	__le16 frame_payload_size;
> > +	__le16 max_iocb_allocation;
> > +	__le16 execution_throttle;
> 
> Shouldn't all these _not_ have the leading __?

[linux]$ git grep le32 include/linux/|grep -v _le32|grep -v le32_
[linux]$ 


> Perhaps the uint8_t uses should be converted to u8 as well.
> 
> [etc...]

Sure.  It's up to maintainers to clean up this driver though. I merely
posted this to show that proper tagging of endian-ness is not hard.

-- 
MST

      reply	other threads:[~2016-12-11  2:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-09 20:45 [PATCH] scsi/qla2xxx: label endian-ness for many fields Michael S. Tsirkin
2016-12-09 20:48 ` Madhani, Himanshu
2016-12-10  5:49 ` Joe Perches
2016-12-11  2:02   ` Michael S. Tsirkin [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=20161211035822-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=Bart.VanAssche@sandisk.com \
    --cc=Himanshu.Madhani@cavium.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=qla2xxx-upstream@qlogic.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.