From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754513AbcBVLDe (ORCPT ); Mon, 22 Feb 2016 06:03:34 -0500 Received: from smtp-out6.electric.net ([192.162.217.191]:51074 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751781AbcBVLDc convert rfc822-to-8bit (ORCPT ); Mon, 22 Feb 2016 06:03:32 -0500 From: David Laight To: "'Robert Richter'" , "David S . Miller" , Sunil Goutham , Robert Richter CC: "netdev@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Robert Richter Subject: RE: [PATCH 2/2] net, thunderx: Use bool in structs where possible Thread-Topic: [PATCH 2/2] net, thunderx: Use bool in structs where possible Thread-Index: AQHRak2YSJQxGxxel0yLJAEFBqncxZ836yMg Date: Mon, 22 Feb 2016 11:00:02 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CCE6A71@AcuExch.aculab.com> References: <1455799149-19590-1-git-send-email-rrichter@caviumnetworks.com> <1455799149-19590-3-git-send-email-rrichter@caviumnetworks.com> In-Reply-To: <1455799149-19590-3-git-send-email-rrichter@caviumnetworks.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robert Richter > Sent: 18 February 2016 12:39 > From: Robert Richter > > Looks like the :1 notation was accidentally introduced (this still > uses 1 byte per flag). Using bool instead, which is the common use. > > Signed-off-by: Robert Richter > --- > drivers/net/ethernet/cavium/thunder/nic.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h > index 688828865c48..fa5b1d2d8e23 100644 > --- a/drivers/net/ethernet/cavium/thunder/nic.h > +++ b/drivers/net/ethernet/cavium/thunder/nic.h > @@ -262,9 +262,9 @@ struct nicvf { > struct pci_dev *pdev; > u8 vf_id; > u8 node; > - u8 tns_mode:1; > - u8 sqs_mode:1; > - u8 loopback_supported:1; > + bool tns_mode; > + bool sqs_mode; > + bool loopback_supported; > bool hw_tso; > u16 mtu; > struct queue_set *qs; If the size of the structure matters, you've just made it two bytes larger. (Although it looks like there is some padding). David