mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Manish Katiyar" <mkatiyar@gmail.com>
To: kernel-janitors@vger.kernel.org, astarikovskiy@suse.de,
	vladimir.p.lebedev@intel.com, LKML <linux-kernel@vger.kernel.org>,
	trivial@vger.kernel.org
Cc: mkatiyar@gmail.com
Subject: [PATCH] Remove warning 'unused variable battery' in drivers/acpi/sbs.c
Date: Sun, 3 Aug 2008 12:54:28 +0530	[thread overview]
Message-ID: <ea11fea30808030024v18912201x46d12fe389e508f8@mail.gmail.com> (raw)

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" <mkatiyar@gmail.com>

---
 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
 	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

             reply	other threads:[~2008-08-03  7:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-03  7:24 Manish Katiyar [this message]
2008-08-03 12:30 ` Ilpo Järvinen
2008-08-03 20:18   ` Randy.Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea11fea30808030024v18912201x46d12fe389e508f8@mail.gmail.com \
    --to=mkatiyar@gmail.com \
    --cc=astarikovskiy@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@vger.kernel.org \
    --cc=vladimir.p.lebedev@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®