All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] init.h: add missing initcall variants
@ 2013-12-02 20:14 Randy Dunlap
  2013-12-07  3:31 ` Timur Tabi
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2013-12-02 20:14 UTC (permalink / raw)
  To: LKML, Andrew Morton, Greg Kroah-Hartman
  Cc: Geert Uytterhoeven, Benjamin Herrenschmidt, Timur Tabi

From: Randy Dunlap <rdunlap@infradead.org>

Add missing initcall variants when building for loadable modules.
This fixes this build error on powerpc allmodconfig:

drivers/tty/ehv_bytechan.c: error: type defaults to 'int' in declaration of 'console_initcall' [-Werror=implicit-int]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Timur Tabi <timur@freescale.com>
---
 include/linux/init.h |    2 ++
 1 file changed, 2 insertions(+)

--- lnx-313-rc2.orig/include/linux/init.h
+++ lnx-313-rc2/include/linux/init.h
@@ -286,9 +286,11 @@ void __init parse_early_options(char *cm
 #define arch_initcall(fn)		module_init(fn)
 #define subsys_initcall(fn)		module_init(fn)
 #define fs_initcall(fn)			module_init(fn)
+#define rootfs_initcall(fn)		module_init(fn)
 #define device_initcall(fn)		module_init(fn)
 #define late_initcall(fn)		module_init(fn)
 
+#define console_initcall(fn)		module_init(fn)
 #define security_initcall(fn)		module_init(fn)
 
 /* Each module must use one module_init(). */

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

* Re: [PATCH] init.h: add missing initcall variants
  2013-12-02 20:14 [PATCH] init.h: add missing initcall variants Randy Dunlap
@ 2013-12-07  3:31 ` Timur Tabi
  2013-12-07  9:01   ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Timur Tabi @ 2013-12-07  3:31 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: LKML, Andrew Morton, Greg Kroah-Hartman, Geert Uytterhoeven,
	Benjamin Herrenschmidt, Timur Tabi

On Mon, Dec 2, 2013 at 2:14 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Add missing initcall variants when building for loadable modules.
> This fixes this build error on powerpc allmodconfig:
>
> drivers/tty/ehv_bytechan.c: error: type defaults to 'int' in declaration of 'console_initcall' [-Werror=implicit-int]

Acked-by: Timur Tabi <timur@tabi.org>

However, I wonder if it makes sense to have a console_initcall in a
module at all.  Is it possible to load and use a console driver as a
module?

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

* Re: [PATCH] init.h: add missing initcall variants
  2013-12-07  3:31 ` Timur Tabi
@ 2013-12-07  9:01   ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2013-12-07  9:01 UTC (permalink / raw)
  To: Timur Tabi
  Cc: Randy Dunlap, LKML, Andrew Morton, Greg Kroah-Hartman,
	Benjamin Herrenschmidt, Timur Tabi

On Sat, Dec 7, 2013 at 4:31 AM, Timur Tabi <timur@tabi.org> wrote:
> On Mon, Dec 2, 2013 at 2:14 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> Add missing initcall variants when building for loadable modules.
>> This fixes this build error on powerpc allmodconfig:
>>
>> drivers/tty/ehv_bytechan.c: error: type defaults to 'int' in declaration of 'console_initcall' [-Werror=implicit-int]
>
> Acked-by: Timur Tabi <timur@tabi.org>
>
> However, I wonder if it makes sense to have a console_initcall in a
> module at all.  Is it possible to load and use a console driver as a
> module?

Of course.

Its use for debugging is limited though, as you obviously won't get output
from it before the module is loaded and the console is registered.

As long as it's e.g. autoloaded from an initramfs, it'll work.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2013-12-07  9:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-02 20:14 [PATCH] init.h: add missing initcall variants Randy Dunlap
2013-12-07  3:31 ` Timur Tabi
2013-12-07  9:01   ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.