From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Hogan Subject: Re: metag test failure in -next due to commit 'module: relocate module_init from init.h to module.h' Date: Fri, 5 Jun 2015 22:39:00 +0100 Message-ID: <20150605213900.GA30510@jhogan-linux.le.imgtec.org> References: <20150605204055.GA981@roeck-us.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Return-path: Content-Disposition: inline In-Reply-To: <20150605204055.GA981-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> Sender: linux-metag-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: To: Guenter Roeck , Paul Gortmaker Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Greg Kroah-Hartman , Jiri Slaby --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 05, 2015 at 01:40:55PM -0700, Guenter Roeck wrote: > My qemu metag runtime test fails in -next due to commit 5ebbb3badaa8 ("mo= dule: > relocate module_init from init.h to module.h"). Bisect log is as follows. > A log of a failed test is available at > http://server.roeck-us.net:8010/builders/qemu-metag-next/builds/173/steps= /qemubuildcommand/logs/stdio >=20 > Essentially the test just hangs in boot. >=20 > Reverting the commit fixes the problem. Thanks for finding and bisecting Guenter! Some build warnings from the same commit caught my eye, which made it a quick one to figure out. Paul, please consider applying the patch below before the offending commit "module: relocate module_init from init.h to module.h", so as not to break bisection. Cheers James =46rom e12856c559d7dff2ad4f6497996610e12e7c7e2d Mon Sep 17 00:00:00 2001 =46rom: 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, 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 =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 fun= ction 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 fun= ction 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=98chanca= ll=E2=80=99 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 Signed-off-by: James Hogan Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Paul Gortmaker Cc: linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org --- drivers/tty/metag_da.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/tty/metag_da.c b/drivers/tty/metag_da.c index 3774600741d8..9325262289f9 100644 --- a/drivers/tty/metag_da.c +++ b/drivers/tty/metag_da.c @@ -640,25 +640,7 @@ err_destroy_ports: put_tty_driver(channel_driver); return ret; } - -static void dashtty_exit(void) -{ - int nport; - struct dashtty_port *dport; - - del_timer_sync(&put_timer); - kthread_stop(dashtty_thread); - del_timer_sync(&poll_timer); - tty_unregister_driver(channel_driver); - for (nport =3D 0; nport < NUM_TTY_CHANNELS; nport++) { - dport =3D &dashtty_ports[nport]; - tty_port_destroy(&dport->port); - } - put_tty_driver(channel_driver); -} - -module_init(dashtty_init); -module_exit(dashtty_exit); +device_initcall(dashtty_init); =20 #ifdef CONFIG_DA_CONSOLE =20 --=20 2.3.6 --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVchb0AAoJEGwLaZPeOHZ6KkUP/AkkV6sTk48RppjiFEW7HhFR GxLP19EtyY3ZSgDLKixQNlmCao0262kyxiihLlB6IDjpcRbz1prXEjh39iqIlA1e GYSTEqqTqiwk7Yg98HN83/+TntZO9b4RGfAAuXEuhI/WKPciLg/L3mWq+2Pvtjja e2zjIn2EaITFv004V07YlekoPpJjIebPi/cKS60Ay+mob3Ca+FQJEXrEsDodpzVc cbhlpGV8rBMoHFYcgxQsi2pn1FF2MCWX2ZmrNbNu28Wn+2jQn0n4QkumCLa0ltvT rsw2IhIV4pg/mHB4lG5NjbpthKvnkc1AIVVuWF57SQJrOKBt8P/hPNcXLADXFpRM zg9klZcLIRyBBs8cajzx5Kcze6zs66c3aEIuJHeOvJTxzDVK0VT+qM0lXFG/HBnK 1AlyQr4Z6Zk2WZI8bYr/ndnJ44lP1YQRqurlwvQ8JONuBWXRKdoE57RPywxM7l84 WQoICXVLVynNgfZzSgo76sxv1ZmzXTzUm3mGlgOy5Ij1MXmS/vseDbf2PaUABhRG FMHKNSA/tRY1egOiCYrxzRWRWLJZ09224mAdpQW7fFH7c89UZfwiXLwWgFw3YiWs m/O9tF/NuOQCMcPPZiV92Gyjj0+aK4nJFClcmvrxKh4nc6kiEdUXE0tXEOyWODH7 c3gFOBbEFQXrU3zmA4ZA =iP++ -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn--