linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] macintosh/ans-lcd: fix build failure after module_init/exit relocation
@ 2015-07-17 13:20 Luis Henriques
  2015-07-18 23:45 ` Paul Gortmaker
  2015-07-31  4:13 ` Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Luis Henriques @ 2015-07-17 13:20 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Paul Gortmaker, linuxppc-dev, linux-kernel

After commit 0fd972a7d91d ("module: relocate module_init from init.h to module.h")
ans-lcd module fails to build with:

drivers/macintosh/ans-lcd.c:201:1: warning: data definition has no type or storage class [enabled by default]
 module_init(anslcd_init);
 ^
drivers/macintosh/ans-lcd.c:201:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
drivers/macintosh/ans-lcd.c:201:1: warning: parameter names (without types) in function declaration [enabled by default]
drivers/macintosh/ans-lcd.c:202:1: warning: data definition has no type or storage class [enabled by default]
 module_exit(anslcd_exit);
 ^
drivers/macintosh/ans-lcd.c:202:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
drivers/macintosh/ans-lcd.c:202:1: warning: parameter names (without types) in function declaration [enabled by default]
drivers/macintosh/ans-lcd.c:155:1: warning: 'anslcd_init' defined but not used [-Wunused-function]
 anslcd_init(void)
 ^
drivers/macintosh/ans-lcd.c:195:1: warning: 'anslcd_exit' defined but not used [-Wunused-function]
 anslcd_exit(void)
 ^

This commit fixes it by replacing linux/init.h by linux/module.h.

Fixes: 0fd972a7d91d ("module: relocate module_init from init.h to module.h")
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 drivers/macintosh/ans-lcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c
index 1a57e88a38f7..cd35079c8c98 100644
--- a/drivers/macintosh/ans-lcd.c
+++ b/drivers/macintosh/ans-lcd.c
@@ -7,7 +7,7 @@
 #include <linux/kernel.h>
 #include <linux/miscdevice.h>
 #include <linux/fcntl.h>
-#include <linux/init.h>
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/fs.h>
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] macintosh/ans-lcd: fix build failure after module_init/exit relocation
  2015-07-17 13:20 [PATCH] macintosh/ans-lcd: fix build failure after module_init/exit relocation Luis Henriques
@ 2015-07-18 23:45 ` Paul Gortmaker
  2015-07-20  9:06   ` Luis Henriques
  2015-07-31  4:13 ` Michael Ellerman
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Gortmaker @ 2015-07-18 23:45 UTC (permalink / raw)
  To: Luis Henriques; +Cc: Benjamin Herrenschmidt, linuxppc-dev, linux-kernel

[[PATCH] macintosh/ans-lcd: fix build failure after module_init/exit relocation] On 17/07/2015 (Fri 14:20) Luis Henriques wrote:

> After commit 0fd972a7d91d ("module: relocate module_init from init.h to module.h")
> ans-lcd module fails to build with:
> 
> drivers/macintosh/ans-lcd.c:201:1: warning: data definition has no type or storage class [enabled by default]
>  module_init(anslcd_init);
>  ^
> drivers/macintosh/ans-lcd.c:201:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
> drivers/macintosh/ans-lcd.c:201:1: warning: parameter names (without types) in function declaration [enabled by default]
> drivers/macintosh/ans-lcd.c:202:1: warning: data definition has no type or storage class [enabled by default]
>  module_exit(anslcd_exit);
>  ^
> drivers/macintosh/ans-lcd.c:202:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
> drivers/macintosh/ans-lcd.c:202:1: warning: parameter names (without types) in function declaration [enabled by default]
> drivers/macintosh/ans-lcd.c:155:1: warning: 'anslcd_init' defined but not used [-Wunused-function]
>  anslcd_init(void)
>  ^
> drivers/macintosh/ans-lcd.c:195:1: warning: 'anslcd_exit' defined but not used [-Wunused-function]
>  anslcd_exit(void)
>  ^
> 
> This commit fixes it by replacing linux/init.h by linux/module.h.

Guess it was inevitable I miss at least one.   This old beast must not
get coverage under any of the ppc defconfigs or allmodconfig, since I
did both...  are you using a custom config for an older box?

Anyway, the thing is controlled by a tristate, so this is the right fix.

I don't have _any_ other fixes queued for that cleanup series, so I'm fine
with this going via the ppc tree, since I'm sure there will be pending
commits there.

Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Thanks,
Paul.
--

> 
> Fixes: 0fd972a7d91d ("module: relocate module_init from init.h to module.h")
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> ---
>  drivers/macintosh/ans-lcd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c
> index 1a57e88a38f7..cd35079c8c98 100644
> --- a/drivers/macintosh/ans-lcd.c
> +++ b/drivers/macintosh/ans-lcd.c
> @@ -7,7 +7,7 @@
>  #include <linux/kernel.h>
>  #include <linux/miscdevice.h>
>  #include <linux/fcntl.h>
> -#include <linux/init.h>
> +#include <linux/module.h>
>  #include <linux/delay.h>
>  #include <linux/fs.h>
>  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] macintosh/ans-lcd: fix build failure after module_init/exit relocation
  2015-07-18 23:45 ` Paul Gortmaker
@ 2015-07-20  9:06   ` Luis Henriques
  0 siblings, 0 replies; 4+ messages in thread
From: Luis Henriques @ 2015-07-20  9:06 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: Benjamin Herrenschmidt, linuxppc-dev, linux-kernel

On Sat, Jul 18, 2015 at 07:45:17PM -0400, Paul Gortmaker wrote:
> [[PATCH] macintosh/ans-lcd: fix build failure after module_init/exit relocation] On 17/07/2015 (Fri 14:20) Luis Henriques wrote:
> 
> > After commit 0fd972a7d91d ("module: relocate module_init from init.h to module.h")
> > ans-lcd module fails to build with:
> > 
> > drivers/macintosh/ans-lcd.c:201:1: warning: data definition has no type or storage class [enabled by default]
> >  module_init(anslcd_init);
> >  ^
> > drivers/macintosh/ans-lcd.c:201:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
> > drivers/macintosh/ans-lcd.c:201:1: warning: parameter names (without types) in function declaration [enabled by default]
> > drivers/macintosh/ans-lcd.c:202:1: warning: data definition has no type or storage class [enabled by default]
> >  module_exit(anslcd_exit);
> >  ^
> > drivers/macintosh/ans-lcd.c:202:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
> > drivers/macintosh/ans-lcd.c:202:1: warning: parameter names (without types) in function declaration [enabled by default]
> > drivers/macintosh/ans-lcd.c:155:1: warning: 'anslcd_init' defined but not used [-Wunused-function]
> >  anslcd_init(void)
> >  ^
> > drivers/macintosh/ans-lcd.c:195:1: warning: 'anslcd_exit' defined but not used [-Wunused-function]
> >  anslcd_exit(void)
> >  ^
> > 
> > This commit fixes it by replacing linux/init.h by linux/module.h.
> 
> Guess it was inevitable I miss at least one.   This old beast must not
> get coverage under any of the ppc defconfigs or allmodconfig, since I
> did both...  are you using a custom config for an older box?
>

I was actually just using a Debian config, which has CONFIG_ANSLCD=m

Cheers,
--
Luís

> Anyway, the thing is controlled by a tristate, so this is the right fix.
> 
> I don't have _any_ other fixes queued for that cleanup series, so I'm fine
> with this going via the ppc tree, since I'm sure there will be pending
> commits there.
> 
> Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> 
> Thanks,
> Paul.
> --
> 
> > 
> > Fixes: 0fd972a7d91d ("module: relocate module_init from init.h to module.h")
> > Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> > ---
> >  drivers/macintosh/ans-lcd.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c
> > index 1a57e88a38f7..cd35079c8c98 100644
> > --- a/drivers/macintosh/ans-lcd.c
> > +++ b/drivers/macintosh/ans-lcd.c
> > @@ -7,7 +7,7 @@
> >  #include <linux/kernel.h>
> >  #include <linux/miscdevice.h>
> >  #include <linux/fcntl.h>
> > -#include <linux/init.h>
> > +#include <linux/module.h>
> >  #include <linux/delay.h>
> >  #include <linux/fs.h>
> >  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: macintosh/ans-lcd: fix build failure after module_init/exit relocation
  2015-07-17 13:20 [PATCH] macintosh/ans-lcd: fix build failure after module_init/exit relocation Luis Henriques
  2015-07-18 23:45 ` Paul Gortmaker
@ 2015-07-31  4:13 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2015-07-31  4:13 UTC (permalink / raw)
  To: Luis Henriques, Benjamin Herrenschmidt
  Cc: Paul Gortmaker, linuxppc-dev, linux-kernel

On Fri, 2015-17-07 at 13:20:31 UTC, Luis Henriques wrote:
> After commit 0fd972a7d91d ("module: relocate module_init from init.h to module.h")
> ans-lcd module fails to build with:
> 
> drivers/macintosh/ans-lcd.c:201:1: warning: data definition has no type or storage class [enabled by default]
>  module_init(anslcd_init);
>  ^
> drivers/macintosh/ans-lcd.c:201:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
> drivers/macintosh/ans-lcd.c:201:1: warning: parameter names (without types) in function declaration [enabled by default]
> drivers/macintosh/ans-lcd.c:202:1: warning: data definition has no type or storage class [enabled by default]
>  module_exit(anslcd_exit);
>  ^
> drivers/macintosh/ans-lcd.c:202:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
> drivers/macintosh/ans-lcd.c:202:1: warning: parameter names (without types) in function declaration [enabled by default]
> drivers/macintosh/ans-lcd.c:155:1: warning: 'anslcd_init' defined but not used [-Wunused-function]
>  anslcd_init(void)
>  ^
> drivers/macintosh/ans-lcd.c:195:1: warning: 'anslcd_exit' defined but not used [-Wunused-function]
>  anslcd_exit(void)
>  ^
> 
> This commit fixes it by replacing linux/init.h by linux/module.h.
> 
> Fixes: 0fd972a7d91d ("module: relocate module_init from init.h to module.h")
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/120d200a86273d1840d0

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-31  4:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-17 13:20 [PATCH] macintosh/ans-lcd: fix build failure after module_init/exit relocation Luis Henriques
2015-07-18 23:45 ` Paul Gortmaker
2015-07-20  9:06   ` Luis Henriques
2015-07-31  4:13 ` Michael Ellerman

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).