From: Ira Weiny <ira.weiny@intel.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: x86@kernel.org, "Andy Lutomirski" <luto@kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
nouveau@lists.freedesktop.org,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"Valentina Manea" <valentina.manea.m@gmail.com>,
"Karol Herbst" <karolherbst@gmail.com>,
"Krzysztof Opasiak" <k.opasiak@samsung.com>,
"Eli Cohen" <eli@mellanox.com>,
netdev@vger.kernel.org, "Shuah Khan" <shuah@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, "Arnd Bergmann" <arnd@arndb.de>,
"Leon Romanovsky" <leon@kernel.org>,
linux-rdma@vger.kernel.org, "Ingo Molnar" <mingo@kernel.org>,
"Jozsef Kadlecsik" <kadlec@netfilter.org>,
coreteam@netfilter.org, "Jakub Kicinski" <kuba@kernel.org>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Pablo Neira Ayuso" <pablo@netfilter.org>,
"Joachim Fritschi" <jfritschi@freenet.de>,
"Felipe Balbi" <felipe.balbi@linux.intel.com>,
"Amit Shah" <amit@kernel.org>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
linux-block@vger.kernel.org,
"Pekka Paalanen" <ppaalanen@gmail.com>,
"Borislav Petkov" <bp@alien8.de>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Jussi Kivilinna" <jussi.kivilinna@mbnet.fi>,
virtualization@lists.linux-foundation.org,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"Jens Axboe" <axboe@kernel.dk>,
linux-scsi@vger.kernel.org,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, "Florian Westphal" <fw@strlen.de>,
linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org,
linux-crypto@vger.kernel.org,
"Igor Kotrasinski" <i.kotrasinsk@samsung.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Saeed Mahameed" <saeedm@nvidia.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 6/9] usb: gadget: eliminate anonymous module_init & module_exit
Date: Wed, 16 Mar 2022 20:29:55 -0700 [thread overview]
Message-ID: <YjKrMyRvHh7nzHwW@iweiny-desk3> (raw)
In-Reply-To: <20220316192010.19001-7-rdunlap@infradead.org>
On Wed, Mar 16, 2022 at 12:20:07PM -0700, Randy Dunlap wrote:
> Eliminate anonymous module_init() and module_exit(), which can lead to
> confusion or ambiguity when reading System.map, crashes/oops/bugs,
> or an initcall_debug log.
>
> Give each of these init and exit functions unique driver-specific
> names to eliminate the anonymous names.
>
> Example 1: (System.map)
> ffffffff832fc78c t init
> ffffffff832fc79e t init
> ffffffff832fc8f8 t init
>
> Example 2: (initcall_debug log)
> calling init+0x0/0x12 @ 1
> initcall init+0x0/0x12 returned 0 after 15 usecs
> calling init+0x0/0x60 @ 1
> initcall init+0x0/0x60 returned 0 after 2 usecs
> calling init+0x0/0x9a @ 1
> initcall init+0x0/0x9a returned 0 after 74 usecs
>
> Fixes: bd25a14edb75 ("usb: gadget: legacy/serial: allow dynamic removal")
> Fixes: 7bb5ea54be47 ("usb gadget serial: use composite gadget framework")
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
I continue to be confused about the latest rules for the Fixes tag but this one
in particular seems completely useless. This is the 'beginning of time' commit
by Linus AFAICT. So do any of these Fixes tags need to be in this series?
Regardless:
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: linux-usb@vger.kernel.org
> ---
> drivers/usb/gadget/legacy/inode.c | 8 ++++----
> drivers/usb/gadget/legacy/serial.c | 10 +++++-----
> drivers/usb/gadget/udc/dummy_hcd.c | 8 ++++----
> 3 files changed, 13 insertions(+), 13 deletions(-)
>
> --- lnx-517-rc8.orig/drivers/usb/gadget/legacy/serial.c
> +++ lnx-517-rc8/drivers/usb/gadget/legacy/serial.c
> @@ -273,7 +273,7 @@ static struct usb_composite_driver gseri
> static int switch_gserial_enable(bool do_enable)
> {
> if (!serial_config_driver.label)
> - /* init() was not called, yet */
> + /* gserial_init() was not called, yet */
> return 0;
>
> if (do_enable)
> @@ -283,7 +283,7 @@ static int switch_gserial_enable(bool do
> return 0;
> }
>
> -static int __init init(void)
> +static int __init gserial_init(void)
> {
> /* We *could* export two configs; that'd be much cleaner...
> * but neither of these product IDs was defined that way.
> @@ -314,11 +314,11 @@ static int __init init(void)
>
> return usb_composite_probe(&gserial_driver);
> }
> -module_init(init);
> +module_init(gserial_init);
>
> -static void __exit cleanup(void)
> +static void __exit gserial_cleanup(void)
> {
> if (enable)
> usb_composite_unregister(&gserial_driver);
> }
> -module_exit(cleanup);
> +module_exit(gserial_cleanup);
> --- lnx-517-rc8.orig/drivers/usb/gadget/udc/dummy_hcd.c
> +++ lnx-517-rc8/drivers/usb/gadget/udc/dummy_hcd.c
> @@ -2765,7 +2765,7 @@ static struct platform_driver dummy_hcd_
> static struct platform_device *the_udc_pdev[MAX_NUM_UDC];
> static struct platform_device *the_hcd_pdev[MAX_NUM_UDC];
>
> -static int __init init(void)
> +static int __init dummy_hcd_init(void)
> {
> int retval = -ENOMEM;
> int i;
> @@ -2887,9 +2887,9 @@ err_alloc_udc:
> platform_device_put(the_hcd_pdev[i]);
> return retval;
> }
> -module_init(init);
> +module_init(dummy_hcd_init);
>
> -static void __exit cleanup(void)
> +static void __exit dummy_hcd_cleanup(void)
> {
> int i;
>
> @@ -2905,4 +2905,4 @@ static void __exit cleanup(void)
> platform_driver_unregister(&dummy_udc_driver);
> platform_driver_unregister(&dummy_hcd_driver);
> }
> -module_exit(cleanup);
> +module_exit(dummy_hcd_cleanup);
> --- lnx-517-rc8.orig/drivers/usb/gadget/legacy/inode.c
> +++ lnx-517-rc8/drivers/usb/gadget/legacy/inode.c
> @@ -2101,7 +2101,7 @@ MODULE_ALIAS_FS("gadgetfs");
>
> /*----------------------------------------------------------------------*/
>
> -static int __init init (void)
> +static int __init gadgetfs_init (void)
> {
> int status;
>
> @@ -2111,12 +2111,12 @@ static int __init init (void)
> shortname, driver_desc);
> return status;
> }
> -module_init (init);
> +module_init (gadgetfs_init);
>
> -static void __exit cleanup (void)
> +static void __exit gadgetfs_cleanup (void)
> {
> pr_debug ("unregister %s\n", shortname);
> unregister_filesystem (&gadgetfs_type);
> }
> -module_exit (cleanup);
> +module_exit (gadgetfs_cleanup);
>
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2022-03-17 3:30 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
2022-03-16 19:20 ` [PATCH 1/9] virtio_blk: " Randy Dunlap
2022-03-17 3:26 ` Jason Wang
2022-03-17 8:45 ` Stefan Hajnoczi
2022-03-20 12:04 ` Michael S. Tsirkin
2022-03-16 19:20 ` [PATCH 2/9] virtio_console: " Randy Dunlap
2022-03-17 15:47 ` Amit Shah
2022-03-17 20:40 ` Randy Dunlap
2022-03-20 12:04 ` Michael S. Tsirkin
2022-03-16 19:20 ` [PATCH 3/9] net: mlx5: " Randy Dunlap
2022-03-24 18:03 ` Leon Romanovsky
2022-03-16 19:20 ` [PATCH 4/9] netfilter: h323: " Randy Dunlap
[not found] ` <YjNYo2LKM3smgEJM@salvia>
2022-03-17 20:42 ` Randy Dunlap
2022-03-16 19:20 ` [PATCH 5/9] virtio-scsi: " Randy Dunlap
2022-03-17 3:25 ` Jason Wang
2022-03-17 8:46 ` Stefan Hajnoczi
2022-03-20 12:04 ` Michael S. Tsirkin
2022-03-30 3:51 ` Martin K. Petersen
2022-03-16 19:20 ` [PATCH 6/9] usb: gadget: " Randy Dunlap
2022-03-17 3:29 ` Ira Weiny [this message]
2022-03-17 4:59 ` Randy Dunlap
2022-03-16 19:20 ` [PATCH 7/9] usb: usbip: " Randy Dunlap
2022-03-16 19:20 ` [PATCH 8/9] x86/crypto: " Randy Dunlap
2022-04-08 8:31 ` Herbert Xu
2022-03-16 19:20 ` [PATCH 9/9] testmmiotrace: " Randy Dunlap
2022-03-17 2:38 ` Steven Rostedt
2022-03-17 3:32 ` [PATCH 0/9] treewide: " Ira Weiny
2022-03-17 16:11 ` (subset) " Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YjKrMyRvHh7nzHwW@iweiny-desk3 \
--to=ira.weiny@intel.com \
--cc=amit@kernel.org \
--cc=arnd@arndb.de \
--cc=axboe@kernel.dk \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=coreteam@netfilter.org \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=eli@mellanox.com \
--cc=felipe.balbi@linux.intel.com \
--cc=fw@strlen.de \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=i.kotrasinsk@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=jfritschi@freenet.de \
--cc=jussi.kivilinna@mbnet.fi \
--cc=k.opasiak@samsung.com \
--cc=kadlec@netfilter.org \
--cc=karolherbst@gmail.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=luto@kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mingo@kernel.org \
--cc=mirq-linux@rere.qmqm.pl \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=pablo@netfilter.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=ppaalanen@gmail.com \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=saeedm@nvidia.com \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=stefanha@redhat.com \
--cc=tglx@linutronix.de \
--cc=valentina.manea.m@gmail.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox