Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp917021pxp; Wed, 16 Mar 2022 21:13:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylBFP9qLnQzGVYsJ0gUwewVGItkI5evBZy9XDXbnoUgWG9QhIvU+5CCLk3Ixlk/NACC6Km X-Received: by 2002:a17:902:b18a:b0:153:758e:c1 with SMTP id s10-20020a170902b18a00b00153758e00c1mr3117299plr.37.1647490419417; Wed, 16 Mar 2022 21:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647490419; cv=none; d=google.com; s=arc-20160816; b=suWzzeaanrng7a1JxD/VWihr210Sk0J8UnQdcgXX6daFbPsg7E6Qtd1nDi/lt+kdkm BG9SpGjvXwxVdyw81Ai3Ia5W59yMdHWP4wKaQlT41mZ3ttwh1fmfvnzf4y4lY69S6ycD py78g65NgF4ngg7Fd7OnjS3SOM7VX2KDdwCf4gPLEMFzBei7uxpDail1WRu4TzzJsmA2 YC1CpGI6ODNjy2IFxe6GJcVXO7xxHsHyxsfYtKMbRdTqAXpVf8JfmFOV6RH1jmf7q2iw nF5vpgNCNpioGoP3UjA9SoC0IzVykn4IToVmvf1B1ioAFW/8JfW3o4XWufojZ69MppFH Z7rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=I73CgbF6729wI2OMfPa7NCxG3sEoqNqrUxCVuaWYikI=; b=RGVa1aV9GzkOXTeIWrO/tNbDosIT2nCP2OtojJQ3dc+Dqy9B01HRnJlxHOeJR1aGUQ /M0D41co+HwM9jVOzNzVOw7R3hkL2uKnQqYllKgfolpDUJNWLv2fTcET4ISKDLqUs+xa 39s+LRyJmIUUFQVzoEhDQFOlKLcZjfUyUACcdNfRfPs3u/DgJFC/PNbQVCsaGlKZcMVR G4hQAmKKy+DmwnKra6BZyilpYfMP5+u1Z/PtpA+4+9dqJ3OtOr2KulkGiNFli2tpO0iP uV1ktqEhw9On4j0Yk8MdME1rLEo66rHdMrBjfq0ZlI3k8b4OI9K6uDtd72YjrdyVueoS WiBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=vfQEJC7c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f16-20020a056a001ad000b004f7ba8b4428si3862429pfv.16.2022.03.16.21.13.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 21:13:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=vfQEJC7c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 58E97B823D; Wed, 16 Mar 2022 20:51:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357956AbiCPTWG (ORCPT + 99 others); Wed, 16 Mar 2022 15:22:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357860AbiCPTVm (ORCPT ); Wed, 16 Mar 2022 15:21:42 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17A1340A3F; Wed, 16 Mar 2022 12:20:28 -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=I73CgbF6729wI2OMfPa7NCxG3sEoqNqrUxCVuaWYikI=; b=vfQEJC7clJiDCX70jOXFjsAqVr RsHe0lFIEd1MJgFbYE0gt+pK9/bBQ9yr/XHgb6PlXtKVNnE4grHpTSqJXg+QKYQKUpGnsBonJ9U01 hDerMUrt6itAF3TL6Llq6sGGjgWz0n599JPSP5lVrYGGZTJrOpKqSEWKxM3DdyX/hO6EDO6WwFV5C SobsjsMQ5TbbMAVQdJlaP8GZyf1U8kWywA8fSEQxcpsaz/Da6CGPqDfObwvZPtq5v+9H3k0mO94hs HAGJyirDT+UWjgACI8PEJ0FufcIHgw7aJb7xm7hWahssEZydzz68UNUu2l9JpqX2qCyCWQXC/V06+ cVrWMhgA==; 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 1nUZC7-00EArp-Gg; Wed, 16 Mar 2022 19:20:27 +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 7/9] usb: usbip: eliminate anonymous module_init & module_exit Date: Wed, 16 Mar 2022 12:20:08 -0700 Message-Id: <20220316192010.19001-8-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-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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: 80fd9cd52de6 ("usbip: vudc: Add VUDC main file") Signed-off-by: Randy Dunlap Cc: Krzysztof Opasiak Cc: Igor Kotrasinski Cc: Greg Kroah-Hartman Cc: Valentina Manea Cc: Shuah Khan Cc: Shuah Khan Cc: linux-usb@vger.kernel.org --- drivers/usb/usbip/vudc_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- lnx-517-rc8.orig/drivers/usb/usbip/vudc_main.c +++ lnx-517-rc8/drivers/usb/usbip/vudc_main.c @@ -28,7 +28,7 @@ static struct platform_driver vudc_drive static struct list_head vudc_devices = LIST_HEAD_INIT(vudc_devices); -static int __init init(void) +static int __init vudc_init(void) { int retval = -ENOMEM; int i; @@ -86,9 +86,9 @@ cleanup: out: return retval; } -module_init(init); +module_init(vudc_init); -static void __exit cleanup(void) +static void __exit vudc_cleanup(void) { struct vudc_device *udc_dev = NULL, *udc_dev2 = NULL; @@ -103,7 +103,7 @@ static void __exit cleanup(void) } platform_driver_unregister(&vudc_driver); } -module_exit(cleanup); +module_exit(vudc_cleanup); MODULE_DESCRIPTION("USB over IP Device Controller"); MODULE_AUTHOR("Krzysztof Opasiak, Karol Kosik, Igor Kotrasinski");