From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Gortmaker Subject: Re: metag test failure in -next due to commit 'module: relocate module_init from init.h to module.h' Date: Sun, 7 Jun 2015 18:17:28 -0400 Message-ID: <20150607221727.GA7125@windriver.com> References: <20150605204055.GA981@roeck-us.net> <20150605213900.GA30510@jhogan-linux.le.imgtec.org> <55724131.9040900@roeck-us.net> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <55724131.9040900-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> Sender: linux-metag-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="utf-8" To: Guenter Roeck Cc: James Hogan , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Greg Kroah-Hartman , Jiri Slaby [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 2= 001 > >From: James Hogan > >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=3DUTF-8 > >Content-Transfer-Encoding: 8bit > > > >The metag_da TTY driver can't get built as a module at the moment, b= ut > >it still uses module_init() and module_exit(). Those macros are movi= ng > >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 apparen= t > >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 =E2=80=98int=E2= =80=99 in declaration of =E2=80=98module_init=E2=80=99 > >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 =E2=80=98int=E2= =80=99 in declaration of =E2=80=98module_exit=E2=80=99 > >drivers/tty/metag_da.c:661: warning: parameter names (without types)= in function declaration > >drivers/tty/metag_da.c:572: warning: =E2=80=98dashtty_init=E2=80=99 = defined but not used > >drivers/tty/metag_da.c:645: warning: =E2=80=98dashtty_exit=E2=80=99 = defined but not used > >drivers/tty/metag_da.c In function =E2=80=98dash_console_write=E2=80= =99: > >drivers/tty/metag_da.c:670 : warning: passing argument 4 of =E2=80=98= chancall=E2=80=99 discards qualifiers from pointer target type > > > >Instead of just adding the module.h include, now would be a good tim= e 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 b= e > >resurrected. > > > >Reported-by: Guenter Roeck > >Signed-off-by: James Hogan > >Cc: Greg Kroah-Hartman > >Cc: Jiri Slaby > >Cc: Paul Gortmaker > >Cc: linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >=20 > Yes, that does the trick. >=20 > Tested-by: Guenter Roeck Thanks guys, I'll add that to the module_init-device_initcall conversio= n branch, which will put it ahead of the code relocation commit. I think most other arch run with -Werror-implicit (or whatever it is) s= o that these kinds of things would not "leak" past into a silent boot fail like this. Paul. -- >=20 > Thanks, > Guenter >=20