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]
Message-ID: <ba6fba79de06543dc3adc09eabbfdaa6a5eeacb4.camel@gmail.com>
Date: Fri, 15 Aug 2025 23:36:46 +0200
From: Alexander Sverdlin <alexander.sverdlin@...il.com>
To: Arnd Bergmann <arnd@...nel.org>, Alexandre Belloni	
 <alexandre.belloni@...tlin.com>, Antoni Pokusinski <apokusinski01@...il.com>
Cc: Arnd Bergmann <arnd@...db.de>, Ahmad Fatoum <a.fatoum@...gutronix.de>, 
 Lukas Stockmann <lukas.stockmann@...mens.com>, Maud Spierings
 <maudspierings@...ontroll.com>, Oleksij Rempel	 <o.rempel@...gutronix.de>,
 linux-rtc@...r.kernel.org, 	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtc: pcf85063: hide an unused variable

On Fri, 2025-07-25 at 11:07 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> The newly introduced configuration is only used by code that is
> inside of an #ifdef block, cauing a warning when that block is
> disabled by the configuration is still there:
> 
> drivers/rtc/rtc-pcf85063.c:566:37: error: 'config_rv8063' defined but not used [-Werror=unused-const-variable=]
> 
> Add the same #ifdef here.
> 
> Fixes: a3c7f7e16ea8 ("rtc: pcf85063: add support for RV8063")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@...il.com>

> ---
>  drivers/rtc/rtc-pcf85063.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c
> index d9b67b959d18..41e4a5a16574 100644
> --- a/drivers/rtc/rtc-pcf85063.c
> +++ b/drivers/rtc/rtc-pcf85063.c
> @@ -563,6 +563,7 @@ static const struct pcf85063_config config_rv8263 = {
>  	.force_cap_7000 = 1,
>  };
>  
> +#if IS_ENABLED(CONFIG_SPI_MASTER)
>  static const struct pcf85063_config config_rv8063 = {
>  	.regmap = {
>  		.reg_bits = 8,
> @@ -574,6 +575,7 @@ static const struct pcf85063_config config_rv8063 = {
>  	.has_alarms = 1,
>  	.force_cap_7000 = 1,
>  };
> +#endif
>  
>  static int pcf85063_probe(struct device *dev, struct regmap *regmap, int irq,
>  			  const struct pcf85063_config *config)

-- 
Alexander Sverdlin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ