* [PATCH -next] acpi: fix acpi_bus.h warnings when ACPI is not enabled [not found] <20120523170740.ae058d8d5468d471eb948c39@canb.auug.org.au> @ 2012-05-23 16:14 ` Randy Dunlap 2012-06-04 4:32 ` Len Brown 0 siblings, 1 reply; 3+ messages in thread From: Randy Dunlap @ 2012-05-23 16:14 UTC (permalink / raw) To: Stephen Rothwell; +Cc: linux-next, LKML, linux-acpi, Len Brown From: Randy Dunlap <rdunlap@xenotime.net> Fix header file warnings when CONFIG_ACPI is not enabled: include/acpi/acpi_bus.h:443:42: warning: 'struct acpi_bus_type' declared inside parameter list include/acpi/acpi_bus.h:443:42: warning: its scope is only this definition or declaration, which is probably not what you want include/acpi/acpi_bus.h:444:44: warning: 'struct acpi_bus_type' declared inside parameter list Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> --- include/acpi/acpi_bus.h | 2 ++ 1 file changed, 2 insertions(+) --- linux-next-20120523.orig/include/acpi/acpi_bus.h +++ linux-next-20120523/include/acpi/acpi_bus.h @@ -440,6 +440,8 @@ static inline int acpi_pm_device_sleep_w #else /* CONFIG_ACPI */ +struct acpi_bus_type; + static int register_acpi_bus_type(struct acpi_bus_type *bus) { return 0; } static int unregister_acpi_bus_type(struct acpi_bus_type *bus) { return 0; } ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] acpi: fix acpi_bus.h warnings when ACPI is not enabled 2012-05-23 16:14 ` [PATCH -next] acpi: fix acpi_bus.h warnings when ACPI is not enabled Randy Dunlap @ 2012-06-04 4:32 ` Len Brown 2012-06-04 14:42 ` Randy Dunlap 0 siblings, 1 reply; 3+ messages in thread From: Len Brown @ 2012-06-04 4:32 UTC (permalink / raw) To: Randy Dunlap Cc: Stephen Rothwell, linux-next, LKML, linux-acpi, Matthew Garrett Hi Randy, with your patch applied and CONFIG_ACPI=n, I still get: include/acpi/acpi_bus.h:445:12: warning: ‘register_acpi_bus_type’ defined but not used [-Wunused-function] include/acpi/acpi_bus.h:446:12: warning: ‘unregister_acpi_bus_type’ defined but not used [-Wunused-function] so I think I prefer the patch below. thanks, Len Brown, Intel Open Source Technology Center On 05/23/2012 12:14 PM, Randy Dunlap wrote: > From: Randy Dunlap <rdunlap@xenotime.net> > > Fix header file warnings when CONFIG_ACPI is not enabled: > > include/acpi/acpi_bus.h:443:42: warning: 'struct acpi_bus_type' declared inside parameter list > include/acpi/acpi_bus.h:443:42: warning: its scope is only this definition or declaration, which is probably not what you want > include/acpi/acpi_bus.h:444:44: warning: 'struct acpi_bus_type' declared inside parameter list > > Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> > --- > include/acpi/acpi_bus.h | 2 ++ > 1 file changed, 2 insertions(+) > > --- linux-next-20120523.orig/include/acpi/acpi_bus.h > +++ linux-next-20120523/include/acpi/acpi_bus.h > @@ -440,6 +440,8 @@ static inline int acpi_pm_device_sleep_w > > #else /* CONFIG_ACPI */ > > +struct acpi_bus_type; > + > static int register_acpi_bus_type(struct acpi_bus_type *bus) { return 0; } > static int unregister_acpi_bus_type(struct acpi_bus_type *bus) { return 0; } > Subject: [PATCH] ACPI: fix acpi_bus.h build warnings when ACPI is not enabled introduced in Linux-3.5-rc1 by 66886d6f8c9bcdee3d7fce5796dcffd6b4bc0b48 (ACPI: Add stubs for (un)register_acpi_bus_type) Fix header file warnings when CONFIG_ACPI is not enabled: include/acpi/acpi_bus.h:443:42: warning: 'struct acpi_bus_type' declared inside parameter list include/acpi/acpi_bus.h:443:42: warning: its scope is only this definition or declaration, which is probably not include/acpi/acpi_bus.h:444:44: warning: 'struct acpi_bus_type' declared inside parameter list Signed-off-by: Len Brown <len.brown@intel.com> --- include/acpi/acpi_bus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index b0d6282..9e6e1c6 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -440,8 +440,8 @@ static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) #else /* CONFIG_ACPI */ -static int register_acpi_bus_type(struct acpi_bus_type *bus) { return 0; } -static int unregister_acpi_bus_type(struct acpi_bus_type *bus) { return 0; } +static inline int register_acpi_bus_type(void *bus) { return 0; } +static inline int unregister_acpi_bus_type(void *bus) { return 0; } #endif /* CONFIG_ACPI */ -- 1.7.11.rc0.100.g5498c5f ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] acpi: fix acpi_bus.h warnings when ACPI is not enabled 2012-06-04 4:32 ` Len Brown @ 2012-06-04 14:42 ` Randy Dunlap 0 siblings, 0 replies; 3+ messages in thread From: Randy Dunlap @ 2012-06-04 14:42 UTC (permalink / raw) To: Len Brown; +Cc: Stephen Rothwell, linux-next, LKML, linux-acpi, Matthew Garrett On 06/03/2012 09:32 PM, Len Brown wrote: > Hi Randy, > with your patch applied and CONFIG_ACPI=n, I still get: > > include/acpi/acpi_bus.h:445:12: warning: ‘register_acpi_bus_type’ defined but not used [-Wunused-function] > include/acpi/acpi_bus.h:446:12: warning: ‘unregister_acpi_bus_type’ defined but not used [-Wunused-function] > > so I think I prefer the patch below. Hi Len, I'd love to see your failing .config file if you have it or can reproduce it. My patch still works for me. > thanks, > Len Brown, Intel Open Source Technology Center > > On 05/23/2012 12:14 PM, Randy Dunlap wrote: > >> From: Randy Dunlap <rdunlap@xenotime.net> >> >> Fix header file warnings when CONFIG_ACPI is not enabled: >> >> include/acpi/acpi_bus.h:443:42: warning: 'struct acpi_bus_type' declared inside parameter list >> include/acpi/acpi_bus.h:443:42: warning: its scope is only this definition or declaration, which is probably not what you want >> include/acpi/acpi_bus.h:444:44: warning: 'struct acpi_bus_type' declared inside parameter list >> >> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> >> --- >> include/acpi/acpi_bus.h | 2 ++ >> 1 file changed, 2 insertions(+) >> >> --- linux-next-20120523.orig/include/acpi/acpi_bus.h >> +++ linux-next-20120523/include/acpi/acpi_bus.h >> @@ -440,6 +440,8 @@ static inline int acpi_pm_device_sleep_w >> >> #else /* CONFIG_ACPI */ >> >> +struct acpi_bus_type; >> + >> static int register_acpi_bus_type(struct acpi_bus_type *bus) { return 0; } >> static int unregister_acpi_bus_type(struct acpi_bus_type *bus) { return 0; } >> > > > Subject: [PATCH] ACPI: fix acpi_bus.h build warnings when ACPI is not enabled > > introduced in Linux-3.5-rc1 by > 66886d6f8c9bcdee3d7fce5796dcffd6b4bc0b48 > (ACPI: Add stubs for (un)register_acpi_bus_type) > > Fix header file warnings when CONFIG_ACPI is not enabled: > > include/acpi/acpi_bus.h:443:42: warning: 'struct acpi_bus_type' declared inside parameter list > include/acpi/acpi_bus.h:443:42: warning: its scope is only this definition or declaration, which is probably not > include/acpi/acpi_bus.h:444:44: warning: 'struct acpi_bus_type' declared inside parameter list > > Signed-off-by: Len Brown <len.brown@intel.com> > --- > include/acpi/acpi_bus.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h > index b0d6282..9e6e1c6 100644 > --- a/include/acpi/acpi_bus.h > +++ b/include/acpi/acpi_bus.h > @@ -440,8 +440,8 @@ static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) > > #else /* CONFIG_ACPI */ > > -static int register_acpi_bus_type(struct acpi_bus_type *bus) { return 0; } > -static int unregister_acpi_bus_type(struct acpi_bus_type *bus) { return 0; } > +static inline int register_acpi_bus_type(void *bus) { return 0; } > +static inline int unregister_acpi_bus_type(void *bus) { return 0; } > > #endif /* CONFIG_ACPI */ > -- ~Randy ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-04 14:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20120523170740.ae058d8d5468d471eb948c39@canb.auug.org.au>
2012-05-23 16:14 ` [PATCH -next] acpi: fix acpi_bus.h warnings when ACPI is not enabled Randy Dunlap
2012-06-04 4:32 ` Len Brown
2012-06-04 14:42 ` Randy Dunlap
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).