Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752516AbcLKCCP (ORCPT ); Sat, 10 Dec 2016 21:02:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45862 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751364AbcLKCCO (ORCPT ); Sat, 10 Dec 2016 21:02:14 -0500 Date: Sun, 11 Dec 2016 04:02:07 +0200 From: "Michael S. Tsirkin" To: Joe Perches 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 Message-ID: <20161211035822-mutt-send-email-mst@kernel.org> References: <20161209224216-mutt-send-email-mst@kernel.org> <1481348968.5946.48.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1481348968.5946.48.camel@perches.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sun, 11 Dec 2016 02:02:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1284 Lines: 42 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 > > > > --- > > > > 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