Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1159797 > unrolled thread

Re: metag test failure in -next due to commit 'module: relocate module_init from init.h to module.h'

Started byGuenter Roeck <linux@roeck-us.net>
First post2015-06-06 02:40 +0200
Last post2015-06-08 00:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: metag test failure in -next due to commit 'module: relocate module_init  from init.h to module.h' Guenter Roeck <linux@roeck-us.net> - 2015-06-06 02:40 +0200
    Re: metag test failure in -next due to commit 'module: relocate  module_init from init.h to module.h' Paul Gortmaker <paul.gortmaker@windriver.com> - 2015-06-08 00:20 +0200

#1159797 — Re: metag test failure in -next due to commit 'module: relocate module_init from init.h to module.h'

FromGuenter Roeck <linux@roeck-us.net>
Date2015-06-06 02:40 +0200
SubjectRe: metag test failure in -next due to commit 'module: relocate module_init from init.h to module.h'
Message-ID<pyajv-jZ-11@gated-at.bofh.it>
On 06/05/2015 02:39 PM, James Hogan wrote:
[ ... ]
>
>  From e12856c559d7dff2ad4f6497996610e12e7c7e2d Mon Sep 17 00:00:00 2001
> From: James Hogan <james.hogan@imgtec.com>
> Date: Fri, 5 Jun 2015 22:17:18 +0100
> Subject: [PATCH] tty/metag_da: Avoid module_init/module_exit
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> The metag_da TTY driver can't get built as a module at the moment, but
> it still uses module_init() and module_exit(). Those macros are moving
> to module.h which isn't included by metag_da.c, which will result in the
> following build warnings (remarkably no build errors) and an apparent
> failure to boot as the TTY driver won't be loaded.
>
> drivers/tty/metag_da.c:660: warning: data definition has no type or storage class
> drivers/tty/metag_da.c:660: warning: type defaults to ‘int’ in declaration of ‘module_init’
> drivers/tty/metag_da.c:660: warning: parameter names (without types) in function declaration
> drivers/tty/metag_da.c:661: warning: data definition has no type or storage class
> drivers/tty/metag_da.c:661: warning: type defaults to ‘int’ in declaration of ‘module_exit’
> drivers/tty/metag_da.c:661: warning: parameter names (without types) in function declaration
> drivers/tty/metag_da.c:572: warning: ‘dashtty_init’ defined but not used
> drivers/tty/metag_da.c:645: warning: ‘dashtty_exit’ defined but not used
> drivers/tty/metag_da.c In function ‘dash_console_write’:
> drivers/tty/metag_da.c:670 : warning: passing argument 4 of ‘chancall’ discards qualifiers from pointer target type
>
> Instead of just adding the module.h include, now would be a good time to
> remove the use of these macros, replacing the module_init with
> device_initcall, and removing the exit function altogether since it
> isn't needed. If module support is added later the code can always be
> resurrected.
>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jslaby@suse.cz>
> Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
> Cc: linux-metag@vger.kernel.org

Yes, that does the trick.

Tested-by: Guenter Roeck <linux@roeck-us.net>

Thanks,
Guenter

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

[toc] | [next] | [standalone]


#1160182 — Re: metag test failure in -next due to commit 'module: relocate module_init from init.h to module.h'

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2015-06-08 00:20 +0200
SubjectRe: metag test failure in -next due to commit 'module: relocate module_init from init.h to module.h'
Message-ID<pyR58-4bL-7@gated-at.bofh.it>
In reply to#1159797
[Re: metag test failure in -next due to commit 'module: relocate module_init from init.h to module.h'] On 05/06/2015 (Fri 17:39) Guenter Roeck wrote:

> On 06/05/2015 02:39 PM, James Hogan wrote:
> [ ... ]
> >
> > From e12856c559d7dff2ad4f6497996610e12e7c7e2d Mon Sep 17 00:00:00 2001
> >From: James Hogan <james.hogan@imgtec.com>
> >Date: Fri, 5 Jun 2015 22:17:18 +0100
> >Subject: [PATCH] tty/metag_da: Avoid module_init/module_exit
> >MIME-Version: 1.0
> >Content-Type: text/plain; charset=UTF-8
> >Content-Transfer-Encoding: 8bit
> >
> >The metag_da TTY driver can't get built as a module at the moment, but
> >it still uses module_init() and module_exit(). Those macros are moving
> >to module.h which isn't included by metag_da.c, which will result in the
> >following build warnings (remarkably no build errors) and an apparent
> >failure to boot as the TTY driver won't be loaded.
> >
> >drivers/tty/metag_da.c:660: warning: data definition has no type or storage class
> >drivers/tty/metag_da.c:660: warning: type defaults to ‘int’ in declaration of ‘module_init’
> >drivers/tty/metag_da.c:660: warning: parameter names (without types) in function declaration
> >drivers/tty/metag_da.c:661: warning: data definition has no type or storage class
> >drivers/tty/metag_da.c:661: warning: type defaults to ‘int’ in declaration of ‘module_exit’
> >drivers/tty/metag_da.c:661: warning: parameter names (without types) in function declaration
> >drivers/tty/metag_da.c:572: warning: ‘dashtty_init’ defined but not used
> >drivers/tty/metag_da.c:645: warning: ‘dashtty_exit’ defined but not used
> >drivers/tty/metag_da.c In function ‘dash_console_write’:
> >drivers/tty/metag_da.c:670 : warning: passing argument 4 of ‘chancall’ discards qualifiers from pointer target type
> >
> >Instead of just adding the module.h include, now would be a good time to
> >remove the use of these macros, replacing the module_init with
> >device_initcall, and removing the exit function altogether since it
> >isn't needed. If module support is added later the code can always be
> >resurrected.
> >
> >Reported-by: Guenter Roeck <linux@roeck-us.net>
> >Signed-off-by: James Hogan <james.hogan@imgtec.com>
> >Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >Cc: Jiri Slaby <jslaby@suse.cz>
> >Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
> >Cc: linux-metag@vger.kernel.org
> 
> Yes, that does the trick.
> 
> Tested-by: Guenter Roeck <linux@roeck-us.net>

Thanks guys, I'll add that to the module_init-device_initcall conversion
branch, which will put it ahead of the code relocation commit.

I think most other arch run with -Werror-implicit (or whatever it is) so
that these kinds of things would not "leak" past into a silent boot
fail like this.

Paul.
--

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web