Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756659AbYHCNMj (ORCPT ); Sun, 3 Aug 2008 09:12:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754259AbYHCNMa (ORCPT ); Sun, 3 Aug 2008 09:12:30 -0400 Received: from ti-out-0910.google.com ([209.85.142.191]:44179 "EHLO ti-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753986AbYHCNM3 convert rfc822-to-8bit (ORCPT ); Sun, 3 Aug 2008 09:12:29 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:mime-version:content-type :content-transfer-encoding:content-disposition; b=ZMaq81Wsw7AeSx6J7mdmQ6EXUB+gFmCOoyGBvIMtpwrLG0ugd1y6GswonoXd6Kn6K9 wrnHa4vMoj1Mu+cVS5QWYycaP/LGAIBOr2dmIeVkxA3kkx484+XzNv2R5qk73uOSybxH 3v7b4WYFWZcqzGQR9byBN2Q6UOSXuYK13DbX0= Message-ID: Date: Sun, 3 Aug 2008 18:42:27 +0530 From: "Manish Katiyar" To: "=?ISO-8859-1?Q?Ilpo_J=E4rvinen?=" Subject: [PATCH] resend: Remove warning 'unused variable battery' in drivers/acpi/sbs.c Cc: kernel-janitors@vger.kernel.org, astarikovskiy@suse.de, LKML , trivial@kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2052 Lines: 69 Resend of the patch to remove the following warning: drivers/acpi/sbs.c: In function 'acpi_battery_remove': drivers/acpi/sbs.c:819: warning: unused variable 'battery' Signed-off-by:- "Manish Katiyar" --- drivers/acpi/sbs.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 10a3651..8493603 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c @@ -816,7 +816,9 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) static void acpi_battery_remove(struct acpi_sbs *sbs, int id) { +#if defined (CONFIG_ACPI_SYSFS_POWER) || (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) -- 1.5.4.3 Thanks - Manish On Sun, Aug 3, 2008 at 6:00 PM, Ilpo J?rvinen wrote: > On Sun, 3 Aug 2008, Manish Katiyar wrote: > >> Below patch removes the following warning: >> drivers/acpi/sbs.c: In function 'acpi_battery_remove': >> drivers/acpi/sbs.c:819: warning: unused variable 'battery' >> >> >> >> Signed-off-by:- "Manish Katiyar" >> >> --- >> drivers/acpi/sbs.c | 2 ++ >> 1 files changed, 2 insertions(+), 0 deletions(-) >> >> diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c >> index 10a3651..8493603 100644 >> --- a/drivers/acpi/sbs.c >> +++ b/drivers/acpi/sbs.c >> @@ -816,7 +816,9 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) >> >> static void acpi_battery_remove(struct acpi_sbs *sbs, int id) >> { >> +#ifdef CONFIG_ACPI_SYSFS_POWER || CONFIG_ACPI_PROCFS_POWER > > I don't think you can use || operator in ifdef like that... ...Try > #if defined(...) || (...) instead. > > > -- > i. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/