Re: [PATCH 7/7] staging: ks7010: Move from bool to int in structs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 08, 2018 at 01:34:31PM +0200, Greg Kroah-Hartman wrote:
> On Sun, May 06, 2018 at 03:03:04PM -0700, Nathan Chancellor wrote:
> > Fixes checkpatch.pl warnings.
> > 
> > Signed-off-by: Nathan Chancellor <natechancellor@xxxxxxxxx>
> > ---
> >  drivers/staging/ks7010/ks_hostif.c   | 4 ++--
> >  drivers/staging/ks7010/ks_wlan.h     | 4 ++--
> >  drivers/staging/ks7010/ks_wlan_net.c | 8 ++++----
> >  3 files changed, 8 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
> > index 628171091786..43090922daff 100644
> > --- a/drivers/staging/ks7010/ks_hostif.c
> > +++ b/drivers/staging/ks7010/ks_hostif.c
> > @@ -475,7 +475,7 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
> >  	case DOT11_MAC_ADDRESS:
> >  		hostif_sme_enqueue(priv, SME_GET_MAC_ADDRESS);
> >  		ether_addr_copy(priv->eth_addr, priv->rxp);
> > -		priv->mac_address_valid = true;
> > +		priv->mac_address_valid = 1;
> 
> Wait, why?  This should be bool, not an int.  Why would checkpatch say
> this is incorrect?
> 
> confused,
> 
> greg k-h

CHECK: Avoid using bool structure members because of possible alignment issues - see: https://lkml.org/lkml/2017/11/21/384
#417: FILE: drivers/staging/ks7010/ks_wlan.h:417:
+       bool is_device_open;

Introduced by commit a4c4c0492dad ("checkpatch: add a --strict test for
structs with bool member definitions"). If this is wrong, please feel
free to ignore it!

Thanks,
Nathan
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux