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:	Thu, 7 Jan 2010 14:51:26 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Rakib Mullick <rakib.mullick@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>, Len Brown <lenb@...nel.org>,
	Alexey Starikovskiy <astarikovskiy@...e.de>
Subject: Re: [PATCH] acpi: Fix unused variable warning in sbs.c

On Sun, 3 Jan 2010 19:27:56 +0600
Rakib Mullick <rakib.mullick@...il.com> wrote:

>  Fix unused variabled warning.
> 
> When CONFIG_ACPI_SYSFS_POWER=n and CONFIG_ACPI_PROCFS_POWER=n, then
> we're warned by the following warning:
> 
> drivers/acpi/sbs.c: In function `acpi_battery_remove':
> drivers/acpi/sbs.c:825: warning: unused variable `battery'
> 
> 
> Signed-off-by: Rakib Mullick <rakib.mullick@...il.com>
> ---
> 
> --- linus/drivers/acpi/sbs.c	2009-12-28 12:37:29.000000000 +0600
> +++ rakib/drivers/acpi/sbs.c	2010-01-03 11:29:07.000000000 +0600
> @@ -822,7 +822,10 @@ static int acpi_battery_add(struct acpi_
> 
>  static void acpi_battery_remove(struct acpi_sbs *sbs, int id)
>  {
> +#if defined(CONFIG_ACPI_SYSFS_POWER) || defined(CONFIG_ACPI_PROCFS_POWER)
>  	struct acpi_battery *battery = &sbs->battery[id];
> +#endif
> +
>  #ifdef CONFIG_ACPI_SYSFS_POWER
>  	if (battery->bat.dev) {
>  		if (battery->have_sysfs_alarm)

Rather an unpleasant patch to a rather unpleasant function :( Oh well,
it's better than a warning.

I wonder if it can be fixed in Kconfig.  Is there any sane use of
this code when CONFIG_ACPI_SYSFS_POWER=n && CONFIG_ACPI_PROCFS_POWER=n?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ