mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rakib Mullick <rakib.mullick@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Len Brown <lenb@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alexey Starikovskiy <astarikovskiy@suse.de>
Subject: [PATCH] acpi: Fix unused variable warning in sbs.c
Date: Sun, 3 Jan 2010 19:27:56 +0600	[thread overview]
Message-ID: <b9df5fa11001030527h71b66dbcgd4ef29c04545cdaf@mail.gmail.com> (raw)

 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@gmail.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)

             reply	other threads:[~2010-01-03 13:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-03 13:27 Rakib Mullick [this message]
2010-01-07 22:51 ` Andrew Morton
2010-01-08  7:04   ` Rakib Mullick
2010-01-09 14:04   ` Alexey Starikovskiy
2010-01-16 21:03     ` Len Brown

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=b9df5fa11001030527h71b66dbcgd4ef29c04545cdaf@mail.gmail.com \
    --to=rakib.mullick@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=astarikovskiy@suse.de \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome