Re: [announce] new tree: "fix all build warnings, on all configs"

From: Rafael J. Wysocki
Date: Tue Oct 21 2008 - 15:33:41 EST


On Tuesday, 21 of October 2008, Ingo Molnar wrote:
>
> * Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
>
> > > * acpi_pm_disable_gpes - Disable the GPEs.
> > > */
> > > -static int acpi_pm_disable_gpes(void)
> > > +static inline int acpi_pm_disable_gpes(void)
> >
> > Just to satisfy my curiosity, what compiler warning does marking
> > functions inline fix?
>
> the commit log below explains the situation. The warning exposed a maze
> of #ifdefs in drivers/acpi/sleep/main.c. It's not the warning we need to
> "fix" but that maze, obviously.

Thanks a lot for _not_ CCing me. :-(

> -------------------------------------------->
> From 6ddae344a73fcff60c840dd4e429bf55562b41f3 Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <mingo@xxxxxxx>
> Date: Fri, 17 Oct 2008 15:44:22 +0200
> Subject: [PATCH] #ifdef complications in drivers/acpi/sleep/main.c
>
> this warning:
>
> drivers/acpi/sleep/main.c:67: warning: âacpi_pm_disable_gpesâ defined but not used
> drivers/acpi/sleep/main.c:92: warning: âacpi_pm_prepareâ defined but not used
> drivers/acpi/sleep/main.c:107: warning: âacpi_pm_finishâ defined but not used
> drivers/acpi/sleep/main.c:128: warning: âacpi_pm_endâ defined but not used
>
> Shows that this code has an identity crisis due to a maze of #ifdefs, in
> the PM_SLEEP && !SUSPEND && !HIBERNATION case for example.

This case is invalid, because PM_SLEEP == SUSPEND || HIBERNATION !

I don't know how you managed to get
(PM_SLEEP && !SUSPEND && !HIBERNATION), but _that_ shouldn'd be possible in the
first place.

If there are warnings in any other case, please let me know and I'll fix them,
but please don't mess up with that code like this without letting me know.

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/