lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 9 Sep 2020 15:17:19 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     Kalle Valo <kvalo@...eaurora.org>
Cc:     davem@...emloft.net, kuba@...nel.org, linux-kernel@...r.kernel.org,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        Amitkumar Karwar <amitkarwar@...il.com>,
        Ganapathi Bhat <ganapathi.bhat@....com>,
        Xinming Hu <huxinming820@...il.com>
Subject: Re: [PATCH 01/32] wireless: marvell: mwifiex: sdio: Move 'static
 const struct's into their own header file

On Tue, 01 Sep 2020, Kalle Valo wrote:

> Lee Jones <lee.jones@...aro.org> wrote:
> 
> > Only include these tables in the 1 source file they are used.
> > 
> > Fixes hundreds of W=1 warnings!
> > 
> > Fixes the following W=1 kernel build warning(s):
> > 
> >  In file included from drivers/net/wireless/marvell/mwifiex/main.h:59,
> >  from drivers/net/wireless/marvell/mwifiex/main.c:22:
> >  drivers/net/wireless/marvell/mwifiex/sdio.h:705:41: warning: ‘mwifiex_sdio_sd8801’ defined but not used [-Wunused-const-variable=]
> >  705 | static const struct mwifiex_sdio_device mwifiex_sdio_sd8801 = {
> >  | ^~~~~~~~~~~~~~~~~~~
> > 
> >  NB: There were 100's of these - snipped for brevity.
> > 
> > Cc: Amitkumar Karwar <amitkarwar@...il.com>
> > Cc: Ganapathi Bhat <ganapathi.bhat@....com>
> > Cc: Xinming Hu <huxinming820@...il.com>
> > Cc: Kalle Valo <kvalo@...eaurora.org>
> > Cc: "David S. Miller" <davem@...emloft.net>
> > Cc: Jakub Kicinski <kuba@...nel.org>
> > Cc: linux-wireless@...r.kernel.org
> > Cc: netdev@...r.kernel.org
> > Signed-off-by: Lee Jones <lee.jones@...aro.org>
> 
> I don't think static const variables should be in a .h file. Wouldn't
> sdio.c be the right place for these? At least from a quick look I got
> that impression.

That's a bone of contention.  I personally do not like to see C-files
overwhelmed by a sea of structs/tables and tend to ferry them off into
*-tables.h header files instead.

As the gate-keeper, what you say goes.  So if you insist we move these
450 lines of tables into the source file which references them, I will
of course do as you ask.

> Patch set to Changes Requested.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ