mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Manish Katiyar" <mkatiyar@gmail.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
Cc: kernel-janitors@vger.kernel.org, astarikovskiy@suse.de,
	LKML <linux-kernel@vger.kernel.org>,
	trivial@kernel.org
Subject: [PATCH] resend: Remove warning 'unused variable battery' in drivers/acpi/sbs.c
Date: Sun, 3 Aug 2008 18:42:27 +0530	[thread overview]
Message-ID: <ea11fea30808030612m7ab72e85xf34e290d674d955d@mail.gmail.com> (raw)

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" <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)
 {
+#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 <ilpo.jarvinen@helsinki.fi> 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" <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
>
> I don't think you can use || operator in ifdef like that... ...Try
> #if defined(...) || (...) instead.
>
>
> --
>  i.
>

             reply	other threads:[~2008-08-03 13:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-03 13:12 Manish Katiyar [this message]
2008-08-03 14:43 ` Ilpo Järvinen

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=ea11fea30808030612m7ab72e85xf34e290d674d955d@mail.gmail.com \
    --to=mkatiyar@gmail.com \
    --cc=astarikovskiy@suse.de \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@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

all inboxes | Powered by JetHome®