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]
Message-ID: <20180926074114.GA4966@flashbox>
Date:   Wed, 26 Sep 2018 00:41:14 -0700
From:   Nathan Chancellor <natechancellor@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH] staging: rtl8723bs: Mark ACPI table declaration as maybe
 unused

On Wed, Sep 26, 2018 at 09:13:59AM +0200, Greg Kroah-Hartman wrote:
> On Wed, Sep 26, 2018 at 12:02:09AM -0700, Nathan Chancellor wrote:
> > Clang emits the following warning:
> > 
> > drivers/staging/rtl8723bs/os_dep/sdio_intf.c:25:36: warning: variable
> > 'acpi_ids' is not needed and will not be emitted
> > [-Wunneeded-internal-declaration]
> > static const struct acpi_device_id acpi_ids[] = {
> >                                    ^
> > 1 warning generated.
> > 
> > Mark the declaration as maybe unused like a few other instances of this
> > construct in the kernel.
> > 
> > Link: https://github.com/ClangBuiltLinux/linux/issues/169
> > Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> > ---
> >  drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> > index 6d02904de63f..3285bf36291b 100644
> > --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> > +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> > @@ -22,7 +22,7 @@ static const struct sdio_device_id sdio_ids[] =
> >  	{ SDIO_DEVICE(0x024c, 0xb723), },
> >  	{ /* end: all zeroes */				},
> >  };
> > -static const struct acpi_device_id acpi_ids[] = {
> > +static const struct acpi_device_id acpi_ids[] __maybe_unused = {
> 
> But it is used.  No "maybe" at all here.  The MODULE_DEVICE_TABLE()
> macro does a functional thing.  Why is gcc not reporting an issue with
> this and clang is?
> 
> thanks,
> 
> greg k-h

I am not entirely sure, I've added Nick to this thread to see what he
thinks. I'm by no means a Clang expert at the moment.

Thanks,
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ