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: <nycvar.YFH.7.76.2404031420450.20263@cbobk.fhfr.pm>
Date: Wed, 3 Apr 2024 14:23:14 +0200 (CEST)
From: Jiri Kosina <jikos@...nel.org>
To: Arnd Bergmann <arnd@...nel.org>
cc: linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>, 
    Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
    Ralf Baechle <ralf@...ux-mips.org>
Subject: Re: [PATCH 12/34] apm-emulation: hide an unused variable

On Wed, 3 Apr 2024, Arnd Bergmann wrote:

> From: Arnd Bergmann <arnd@...db.de>
> 
> The driver_version variable is only used inside of an #ifdef block, which
> leads to a W=1 warning:
> 
> drivers/char/apm-emulation.c:144:19: error: 'driver_version' defined but not used [-Werror=unused-const-variable=]
> 
> Move this into the function using it.
> 
> Fixes: 7726942fb15e ("[APM] Add shared version of APM emulation")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  drivers/char/apm-emulation.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/char/apm-emulation.c b/drivers/char/apm-emulation.c
> index e795390b070f..53ce352f7197 100644
> --- a/drivers/char/apm-emulation.c
> +++ b/drivers/char/apm-emulation.c
> @@ -141,9 +141,6 @@ static struct apm_queue kapmd_queue;
>  
>  static DEFINE_MUTEX(state_lock);
>  
> -static const char driver_version[] = "1.13";	/* no spaces */
> -
> -
>  
>  /*
>   * Compatibility cruft until the IPAQ people move over to the new
> @@ -435,6 +432,8 @@ static struct miscdevice apm_device = {
>   */
>  static int proc_apm_show(struct seq_file *m, void *v)
>  {
> +	static const char driver_version[] = "1.13";	/* no spaces */
> +
>  	struct apm_power_info info;
>  	char *units;

Heh, I really should mark this driver as Orphaned. Anyway, for this 
particular patch:

	Acked-by: Jiri Kosina <jkosina@...e.com>

-- 
Jiri Kosina
SUSE Labs


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ