* [PATCH] Remove warning 'unused variable battery' in drivers/acpi/sbs.c
@ 2008-08-03 7:24 Manish Katiyar
2008-08-03 12:30 ` Ilpo Järvinen
0 siblings, 1 reply; 3+ messages in thread
From: Manish Katiyar @ 2008-08-03 7:24 UTC (permalink / raw)
To: kernel-janitors, astarikovskiy, vladimir.p.lebedev, LKML, trivial
Cc: mkatiyar
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove warning 'unused variable battery' in drivers/acpi/sbs.c
2008-08-03 7:24 [PATCH] Remove warning 'unused variable battery' in drivers/acpi/sbs.c Manish Katiyar
@ 2008-08-03 12:30 ` Ilpo Järvinen
2008-08-03 20:18 ` Randy.Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Ilpo Järvinen @ 2008-08-03 12:30 UTC (permalink / raw)
To: Manish Katiyar
Cc: kernel-janitors, astarikovskiy, vladimir.p.lebedev, LKML, trivial
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Remove warning 'unused variable battery' in drivers/acpi/sbs.c
2008-08-03 12:30 ` Ilpo Järvinen
@ 2008-08-03 20:18 ` Randy.Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: Randy.Dunlap @ 2008-08-03 20:18 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Manish Katiyar, kernel-janitors, astarikovskiy,
vladimir.p.lebedev, LKML, trivial
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1035 bytes --]
On Sun, 3 Aug 2008, 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" <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.
Did the patch sumbitter try to build this with the patch in place???
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-03 20:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-03 7:24 [PATCH] Remove warning 'unused variable battery' in drivers/acpi/sbs.c Manish Katiyar
2008-08-03 12:30 ` Ilpo Järvinen
2008-08-03 20:18 ` Randy.Dunlap
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®