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:   Mon, 30 May 2022 16:13:48 +0200
From:   Javier Martinez Canillas <javierm@...hat.com>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     kernel test robot <lkp@...el.com>, llvm@...ts.linux.dev,
        kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Geert Uytterhoeven <geert+renesas@...der.be>
Subject: Re: drivers/gpu/drm/solomon/ssd130x-spi.c:154:35: warning: unused
 variable 'ssd130x_spi_table'

On 5/29/22 09:34, Javier Martinez Canillas wrote:
> Hello Nathan,

[snip]

>>
>> You'll see the same warning with GCC and a similar configuration:
>>
> 
> Yes, I'm not saying that the compiler warning is a false positive but
> that the reported error for this driver is. Since the correct fix on
> a driver that support SPI platform devices would be to use the table
> and set it to the struct spi_driver .id field.
>  
>> drivers/gpu/drm/solomon/ssd130x-spi.c:154:35: error: ‘ssd130x_spi_table’ defined but not used [-Werror=unused-const-variable=]
>>   154 | static const struct spi_device_id ssd130x_spi_table[] = {
>>       |                                   ^~~~~~~~~~~~~~~~~
>> cc1: all warnings being treated as errors
>>
>> At the end of the day, this warning only shows up under W=1, so take it
>> as you will. The kernel test robot is a sign, not a cop :)
>>
> 
> I guess something that could be done is to guard the definition of the
> ssd130x_spi_table with a `if IS_MODULE(CONFIG_DRM_SSD130X_SPI)`, since
> if the symbol is 'y' and the driver built-in, then won't be used indeed.
>  

I posted https://lists.freedesktop.org/archives/dri-devel/2022-May/357088.html
to fix this compile warning. Thanks folks!

-- 
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ