From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7599C43219 for ; Wed, 16 Mar 2022 19:20:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357036AbiCPTVj (ORCPT ); Wed, 16 Mar 2022 15:21:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230130AbiCPTVh (ORCPT ); Wed, 16 Mar 2022 15:21:37 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 710C65FF32; Wed, 16 Mar 2022 12:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=bxcgHAl0Vjaoi9igyOuuv3t+bDn9tO/RrS7lBi/KU+M=; b=f6hRy706t/BpNpFO1C9Km2RrDC QpQAZACubPMNHVjc1Qg4uTBS8JBsSkx6wWoOO6MkPJLDnRMPb4gvs6j+IxwOBV3OSeMK+SM4Bc/qr cbVKkVwZ7HPLsk4PUNHYTJtLurqFWxXaUdf1VQas1wSqg474f4RVgG74C1IMA8nhCoibwkT0pOmOU GBglyb2fZdt3taUHK7+NnvqDf/kegkuSfBz7kIBCvuVIgmTmTlKHaYbML2syZZpq1QELYE2/RzZoa l0az3lska8YewVS5FuOdlrR7fZdGroVN4nksyhhqrm4CGqbCEJyDuxhNl+9rqNtKe/b3GXlgFM8kV vY7z0i7Q==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUZBy-00EArp-Bl; Wed, 16 Mar 2022 19:20:18 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , "Michael S. Tsirkin" , Jason Wang , Paolo Bonzini , Stefan Hajnoczi , Jens Axboe , Amit Shah , Arnd Bergmann , Greg Kroah-Hartman , Eli Cohen , Saeed Mahameed , Leon Romanovsky , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Jakub Kicinski , "James E.J. Bottomley" , "Martin K. Petersen" , Felipe Balbi , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Sebastian Andrzej Siewior , Krzysztof Opasiak , Igor Kotrasinski , Valentina Manea , Shuah Khan , Shuah Khan , Jussi Kivilinna , Joachim Fritschi , Herbert Xu , Thomas Gleixner , Steven Rostedt , Ingo Molnar , Karol Herbst , Pekka Paalanen , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-block@vger.kernel.org, linux-crypto@vger.kernel.org, linux-rdma@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, nouveau@lists.freedesktop.org, virtualization@lists.linux-foundation.org, x86@kernel.org Subject: [PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit Date: Wed, 16 Mar 2022 12:20:03 -0700 Message-Id: <20220316192010.19001-3-rdunlap@infradead.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220316192010.19001-1-rdunlap@infradead.org> References: <20220316192010.19001-1-rdunlap@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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: 31610434bc35 ("Virtio console driver") Fixes: 7177876fea83 ("virtio: console: Add ability to remove module") Signed-off-by: Randy Dunlap Cc: Amit Shah Cc: virtualization@lists.linux-foundation.org Cc: Arnd Bergmann Cc: Greg Kroah-Hartman --- drivers/char/virtio_console.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- lnx-517-rc8.orig/drivers/char/virtio_console.c +++ lnx-517-rc8/drivers/char/virtio_console.c @@ -2245,7 +2245,7 @@ static struct virtio_driver virtio_rproc .remove = virtcons_remove, }; -static int __init init(void) +static int __init virtio_console_init(void) { int err; @@ -2280,7 +2280,7 @@ free: return err; } -static void __exit fini(void) +static void __exit virtio_console_fini(void) { reclaim_dma_bufs(); @@ -2290,8 +2290,8 @@ static void __exit fini(void) class_destroy(pdrvdata.class); debugfs_remove_recursive(pdrvdata.debugfs_dir); } -module_init(init); -module_exit(fini); +module_init(virtio_console_init); +module_exit(virtio_console_fini); MODULE_DESCRIPTION("Virtio console driver"); MODULE_LICENSE("GPL"); From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5B3EC433EF for ; Wed, 16 Mar 2022 19:21:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 60FDF417FC; Wed, 16 Mar 2022 19:21:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cFeQFSz7Xvco; Wed, 16 Mar 2022 19:21:18 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id EE1F4417E1; Wed, 16 Mar 2022 19:21:17 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 46A6DC0073; Wed, 16 Mar 2022 19:21:17 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id C4C7BC000B for ; Wed, 16 Mar 2022 19:21:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id AD4E5841EB for ; Wed, 16 Mar 2022 19:21:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=infradead.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vZlSbRnsA8TS for ; Wed, 16 Mar 2022 19:21:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by smtp1.osuosl.org (Postfix) with ESMTPS id 23717841DE for ; Wed, 16 Mar 2022 19:21:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=bxcgHAl0Vjaoi9igyOuuv3t+bDn9tO/RrS7lBi/KU+M=; b=f6hRy706t/BpNpFO1C9Km2RrDC QpQAZACubPMNHVjc1Qg4uTBS8JBsSkx6wWoOO6MkPJLDnRMPb4gvs6j+IxwOBV3OSeMK+SM4Bc/qr cbVKkVwZ7HPLsk4PUNHYTJtLurqFWxXaUdf1VQas1wSqg474f4RVgG74C1IMA8nhCoibwkT0pOmOU GBglyb2fZdt3taUHK7+NnvqDf/kegkuSfBz7kIBCvuVIgmTmTlKHaYbML2syZZpq1QELYE2/RzZoa l0az3lska8YewVS5FuOdlrR7fZdGroVN4nksyhhqrm4CGqbCEJyDuxhNl+9rqNtKe/b3GXlgFM8kV vY7z0i7Q==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUZBy-00EArp-Bl; Wed, 16 Mar 2022 19:20:18 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Subject: [PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit Date: Wed, 16 Mar 2022 12:20:03 -0700 Message-Id: <20220316192010.19001-3-rdunlap@infradead.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220316192010.19001-1-rdunlap@infradead.org> References: <20220316192010.19001-1-rdunlap@infradead.org> MIME-Version: 1.0 Cc: linux-usb@vger.kernel.org, Andy Lutomirski , "Michael S. Tsirkin" , Peter Zijlstra , nouveau@lists.freedesktop.org, Dave Hansen , Valentina Manea , virtualization@lists.linux-foundation.org, Krzysztof Opasiak , Eli Cohen , netdev@vger.kernel.org, Shuah Khan , Thomas Gleixner , "H. Peter Anvin" , Arnd Bergmann , Leon Romanovsky , linux-rdma@vger.kernel.org, Ingo Molnar , Jozsef Kadlecsik , coreteam@netfilter.org, Jakub Kicinski , Sebastian Andrzej Siewior , Pablo Neira Ayuso , Joachim Fritschi , Felipe Balbi , Amit Shah , "James E.J. Bottomley" , Steven Rostedt , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , linux-block@vger.kernel.org, Pekka Paalanen , Borislav Petkov , Stefan Hajnoczi , Shuah Khan , Jussi Kivilinna , Herbert Xu , Jens Axboe , x86@kernel.org, linux-scsi@vger.kernel.org, "Martin K. Petersen" , Greg Kroah-Hartman , Randy Dunlap , Florian Westphal , Karol Herbst , netfilter-devel@vger.kernel.org, linux-crypto@vger.kernel.org, Igor Kotrasinski , Paolo Bonzini , Saeed Mahameed , "David S. Miller" X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" 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: 31610434bc35 ("Virtio console driver") Fixes: 7177876fea83 ("virtio: console: Add ability to remove module") Signed-off-by: Randy Dunlap Cc: Amit Shah Cc: virtualization@lists.linux-foundation.org Cc: Arnd Bergmann Cc: Greg Kroah-Hartman --- drivers/char/virtio_console.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- lnx-517-rc8.orig/drivers/char/virtio_console.c +++ lnx-517-rc8/drivers/char/virtio_console.c @@ -2245,7 +2245,7 @@ static struct virtio_driver virtio_rproc .remove = virtcons_remove, }; -static int __init init(void) +static int __init virtio_console_init(void) { int err; @@ -2280,7 +2280,7 @@ free: return err; } -static void __exit fini(void) +static void __exit virtio_console_fini(void) { reclaim_dma_bufs(); @@ -2290,8 +2290,8 @@ static void __exit fini(void) class_destroy(pdrvdata.class); debugfs_remove_recursive(pdrvdata.debugfs_dir); } -module_init(init); -module_exit(fini); +module_init(virtio_console_init); +module_exit(virtio_console_fini); MODULE_DESCRIPTION("Virtio console driver"); MODULE_LICENSE("GPL"); _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F9BDC433F5 for ; Sun, 27 Mar 2022 07:44:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4D1410E075; Sun, 27 Mar 2022 07:44:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id 71D0010E9C9 for ; Wed, 16 Mar 2022 19:21:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=bxcgHAl0Vjaoi9igyOuuv3t+bDn9tO/RrS7lBi/KU+M=; b=f6hRy706t/BpNpFO1C9Km2RrDC QpQAZACubPMNHVjc1Qg4uTBS8JBsSkx6wWoOO6MkPJLDnRMPb4gvs6j+IxwOBV3OSeMK+SM4Bc/qr cbVKkVwZ7HPLsk4PUNHYTJtLurqFWxXaUdf1VQas1wSqg474f4RVgG74C1IMA8nhCoibwkT0pOmOU GBglyb2fZdt3taUHK7+NnvqDf/kegkuSfBz7kIBCvuVIgmTmTlKHaYbML2syZZpq1QELYE2/RzZoa l0az3lska8YewVS5FuOdlrR7fZdGroVN4nksyhhqrm4CGqbCEJyDuxhNl+9rqNtKe/b3GXlgFM8kV vY7z0i7Q==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUZBy-00EArp-Bl; Wed, 16 Mar 2022 19:20:18 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Date: Wed, 16 Mar 2022 12:20:03 -0700 Message-Id: <20220316192010.19001-3-rdunlap@infradead.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220316192010.19001-1-rdunlap@infradead.org> References: <20220316192010.19001-1-rdunlap@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Sun, 27 Mar 2022 07:44:03 +0000 Subject: [Nouveau] [PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-usb@vger.kernel.org, Andy Lutomirski , "Michael S. Tsirkin" , Peter Zijlstra , nouveau@lists.freedesktop.org, Jason Wang , Dave Hansen , Valentina Manea , virtualization@lists.linux-foundation.org, Krzysztof Opasiak , Eli Cohen , netdev@vger.kernel.org, Shuah Khan , Thomas Gleixner , "H. Peter Anvin" , Arnd Bergmann , Leon Romanovsky , linux-rdma@vger.kernel.org, Ingo Molnar , Jozsef Kadlecsik , coreteam@netfilter.org, Jakub Kicinski , Sebastian Andrzej Siewior , Pablo Neira Ayuso , Joachim Fritschi , Felipe Balbi , Amit Shah , "James E.J. Bottomley" , Steven Rostedt , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , linux-block@vger.kernel.org, Pekka Paalanen , Borislav Petkov , Stefan Hajnoczi , Shuah Khan , Jussi Kivilinna , Herbert Xu , Jens Axboe , x86@kernel.org, linux-scsi@vger.kernel.org, "Martin K. Petersen" , Greg Kroah-Hartman , Randy Dunlap , Florian Westphal , netfilter-devel@vger.kernel.org, linux-crypto@vger.kernel.org, Igor Kotrasinski , Paolo Bonzini , Saeed Mahameed , "David S. Miller" Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" 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: 31610434bc35 ("Virtio console driver") Fixes: 7177876fea83 ("virtio: console: Add ability to remove module") Signed-off-by: Randy Dunlap Cc: Amit Shah Cc: virtualization@lists.linux-foundation.org Cc: Arnd Bergmann Cc: Greg Kroah-Hartman --- drivers/char/virtio_console.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- lnx-517-rc8.orig/drivers/char/virtio_console.c +++ lnx-517-rc8/drivers/char/virtio_console.c @@ -2245,7 +2245,7 @@ static struct virtio_driver virtio_rproc .remove = virtcons_remove, }; -static int __init init(void) +static int __init virtio_console_init(void) { int err; @@ -2280,7 +2280,7 @@ free: return err; } -static void __exit fini(void) +static void __exit virtio_console_fini(void) { reclaim_dma_bufs(); @@ -2290,8 +2290,8 @@ static void __exit fini(void) class_destroy(pdrvdata.class); debugfs_remove_recursive(pdrvdata.debugfs_dir); } -module_init(init); -module_exit(fini); +module_init(virtio_console_init); +module_exit(virtio_console_fini); MODULE_DESCRIPTION("Virtio console driver"); MODULE_LICENSE("GPL");