Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp979690pxp; Wed, 16 Mar 2022 23:19:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUpTM1wnHw9oO4Ctd+4hvCJdf5g19Ts0823/Gh7yE+QQhkFRx0GbxKM1NX4+ur/boxDgUU X-Received: by 2002:a17:902:f785:b0:14d:d2b6:b7c with SMTP id q5-20020a170902f78500b0014dd2b60b7cmr3041027pln.68.1647497939980; Wed, 16 Mar 2022 23:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647497939; cv=none; d=google.com; s=arc-20160816; b=NgPbnB17oY6McGmgJlBodQ3/asBDHkRCzDlAQ4k0oGnv2gKSb0S+PGbLqX2NL/Kyse 7V6yX1QdjsP7h2DFsxHA8CEcK5+Oo0Z4t+zGTLvLiZQJYfghkEOh2Z6SHRgRgUISGgSW AxPEBpxcrzVld3JCjXk14+wZRqah4UIhjzhnnXaVHcUUioT6Z8pGl9eAFnvnlvCiYiTY 7vDhmFXhS4a8e0wYLOrMcFfdvGdnDrvFvrYoKOZwVS/sf0LqkTWth8sZ1zatBEdvLcY2 KcJle+A6VQsQvglaxU3ZeT+yjrpZooriER7td2bqesTC8NdbU4tPTw054t26Koj7oEfE 1KZg== 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=xtNRe1xty6FQQPFuledRJUXSwUairNMM4kORWxmQYV8=; b=IMwGKKq1Ewkgzc0MDWBhmBmJ3PBg5OaxsCJlqIpqbq+UP9a8FreS9G5Lt0SxznhIsC iDL83yiq8dKAoOnHK6xB6haz4Y3orAzrD6u06UymS7TGb+aa/3vyNAUuz+GLbo2SUv4C bOG1TxKXrN9WL4R2H9h/CxS7d1hJonwm6JV0YS/lYTbVxmvLqn4pCFHg2o721bBRtjnq i6p0R7DfyCpzYUPhR4ZpiYUSnN5K+vpgWUbrhoWkwMHgxb5FwnObV04brUPrlNvPVifz 4YP3CkZFQluB8I9lHUsFIuZ2gf+26lA08azkxQntBwtUb5HtcEoXMDKiyRMp34tfhMxO MmeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=t84D6OIO; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-crypto-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 n27-20020a634d5b000000b003816043efc6si1144832pgl.443.2022.03.16.23.18.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:18:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=t84D6OIO; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9308B2493DA; Wed, 16 Mar 2022 22:03:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357854AbiCPTVl (ORCPT + 99 others); Wed, 16 Mar 2022 15:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352938AbiCPTVj (ORCPT ); Wed, 16 Mar 2022 15:21:39 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59CA440A3F; Wed, 16 Mar 2022 12:20:24 -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=xtNRe1xty6FQQPFuledRJUXSwUairNMM4kORWxmQYV8=; b=t84D6OIOwke7941Ipke874O+qb aGBsnQhRO4EXcylH7PbZ6WwWeCmIP4gE/9nv3vDdhD6Os6XtG70EyG1KDkHTNG6ABB0g9QcjpdI0J 6N/hmx6YYf+6oZ/gr4ycnfMFPal+Dige9a+w8PggP2gPGgVIZzFbB96HtwvXzZx0mJE3frVq+3ZoH GqAwo3vDUKUFX67ZKegrnZ9P2I9r8/CCabOZh4Q2zU/aeqxkW7pHJ39DGMYNLyBiGPINg7GoFQeGX gTQQQGxpmdVzC4R5jza4poDTlmba5GZouKH8tZYaUsEpaWIqAzRdgk4s8ssWMJ1Zj/YQW+S+dYFbZ wOWrix6Q==; 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 1nUZC3-00EArp-Q1; Wed, 16 Mar 2022 19:20:23 +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 5/9] virtio-scsi: eliminate anonymous module_init & module_exit Date: Wed, 16 Mar 2022 12:20:06 -0700 Message-Id: <20220316192010.19001-6-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-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: 4fe74b1cb051 ("[SCSI] virtio-scsi: SCSI driver for QEMU based virtual machines") Signed-off-by: Randy Dunlap Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Paolo Bonzini Cc: Stefan Hajnoczi Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Cc: virtualization@lists.linux-foundation.org --- drivers/scsi/virtio_scsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- lnx-517-rc8.orig/drivers/scsi/virtio_scsi.c +++ lnx-517-rc8/drivers/scsi/virtio_scsi.c @@ -988,7 +988,7 @@ static struct virtio_driver virtio_scsi_ .remove = virtscsi_remove, }; -static int __init init(void) +static int __init virtio_scsi_init(void) { int ret = -ENOMEM; @@ -1020,14 +1020,14 @@ error: return ret; } -static void __exit fini(void) +static void __exit virtio_scsi_fini(void) { unregister_virtio_driver(&virtio_scsi_driver); mempool_destroy(virtscsi_cmd_pool); kmem_cache_destroy(virtscsi_cmd_cache); } -module_init(init); -module_exit(fini); +module_init(virtio_scsi_init); +module_exit(virtio_scsi_fini); MODULE_DEVICE_TABLE(virtio, id_table); MODULE_DESCRIPTION("Virtio SCSI HBA driver");