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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Nov 2018 16:10:15 -0800
From:   Joe Perches <joe@...ches.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
        linux-rtc@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
        Mark Salyzyn <salyzyn@...roid.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        linux-kernel@...r.kernel.org,
        Rasmus Villemoes <rasmus.villemoes@...vas.dk>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Subject: Re: [PATCH v4 01/21] nvmem: Mark nvmem_type_str array with
 __maybe_unused

On Wed, 2018-11-28 at 21:05 +0200, Andy Shevchenko wrote:
> Since we put static variable to a header file it's copied to each module
> that includes the header. But not all of them are actually using it.
> 
> Mark nvmem_type_str array with __maybe_unused to make a compiler happy:
> 
> In file included from include/linux/rtc.h:18,
>                  from drivers/rtc/rtc-proc.c:15:
> include/linux/nvmem-provider.h:29:27: warning: ‘nvmem_type_str’ defined but not used [-Wunused-const-variable=]
>  static const char * const nvmem_type_str[] = {

It would be better to move this definition into
the one file that seems to use it.

$ git grep -w nvmem_type_str
drivers/nvmem/core.c:   return sprintf(buf, "%s\n", nvmem_type_str[nvmem->type])
include/linux/nvmem-provider.h:static const char * const nvmem_type_str[] = {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ