lkml.org 
[lkml]   [2013]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 05/11] drivers: acpi: Include appropriate header file in utstate.c
Date
Hi,

Currently we didn't do much on automatically optimized out ACPI_FUTURE_USAGE functions as long as they do not affect the generation of vmlinux binary.

> From: Moore, Robert
> Sent: Wednesday, December 18, 2013 1:36 AM
>
> I'm not sure what version of ACPICA you are looking at, but in the master git tree for ACPICA, the file accommon.h includes "acutils.h".
>
> > -----Original Message-----
> > From: Rashika Kheria [mailto:rashika.kheria@gmail.com]
> > Sent: Tuesday, December 17, 2013 1:22 AM
> > To: linux-kernel@vger.kernel.org
> > Cc: Moore, Robert; Zheng, Lv; Wysocki, Rafael J; Len Brown; linux-
> > acpi@vger.kernel.org; josh@joshtriplett.org; devel@acpica.org
> > Subject: [PATCH 05/11] drivers: acpi: Include appropriate header file in
> > utstate.c
> >
> > Include appropriate header file acutils.h in acpica/utstate.c because
> > function acpi_ut_create_pkg_state_and_push() has its prototype declaration
> > in acutils.h. Also, encloses the function in acpica/utstate.c in ifdef
> > condition of ACPI_FUTURE_USAGE.
> >
> > This eliminates the following warning in utstate.c:
> > drivers/acpi/acpica/utstate.c:64:1: warning: no previous prototype for
> > ‘acpi_ut_create_pkg_state_and_push’ [-Wmissing-prototypes]
> >
> > Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> > Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> > ---
> > drivers/acpi/acpica/utstate.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/acpi/acpica/utstate.c b/drivers/acpi/acpica/utstate.c
> > index 03c4c2f..0920d23 100644
> > --- a/drivers/acpi/acpica/utstate.c
> > +++ b/drivers/acpi/acpica/utstate.c
> > @@ -43,6 +43,7 @@
> >
> > #include <acpi/acpi.h>
> > #include "accommon.h"
> > +#include "acutils.h"

IMO, this line is useless.

> >
> > #define _COMPONENT ACPI_UTILITIES
> > ACPI_MODULE_NAME("utstate")
> > @@ -60,6 +61,7 @@ ACPI_MODULE_NAME("utstate")
> > * DESCRIPTION: Create a new state and push it
> > *
> >
> > **************************************************************************
> > ****/
> > +#ifdef ACPI_FUTURE_USAGE
> > acpi_status
> > acpi_ut_create_pkg_state_and_push(void *internal_object,
> > void *external_object,
> > @@ -79,6 +81,7 @@ acpi_ut_create_pkg_state_and_push(void *internal_object,
> > acpi_ut_push_generic_state(state_list, state);
> > return (AE_OK);
> > }
> > +#endif

IMO, these lines are useful.
I have a plan to do a cleanup on all ACPICA build warnings so that such inconsistencies can be sorted out.
Maybe it is time to do it right now.

Thanks
-Lv

> >
> >
> > /*************************************************************************
> > ******
> > *
> > --
> > 1.7.9.5

\
 
 \ /
  Last update: 2013-12-18 07:41    [W:0.088 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site