Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp891987pxp; Wed, 16 Mar 2022 20:23:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPNxRVncM+isenAJEL+jqOyKdeFIgCEqK2AVuLnkJ5WS8O/jZ1HoEjFfPCBEF8v8UsAMdJ X-Received: by 2002:a05:6a00:1daa:b0:4f7:db4f:36d6 with SMTP id z42-20020a056a001daa00b004f7db4f36d6mr2333451pfw.77.1647487385156; Wed, 16 Mar 2022 20:23:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647487385; cv=none; d=google.com; s=arc-20160816; b=T7tdD/mrXdWwpIiZhPU5INVZCSYLMZsViVx7yQLiqLKH2zIqMaShVCWJ7064sUY2yk 4MhhBwxdkg3GnCavXDCepWN+JDO9ojIf5WZkJIkqGcWt5lU+jPS3NbcGW9P8sbgDr+d4 EDUjZULOmo4Mz9hrLop0ACGjTzwxafSVrZZ3PZ5cdv7XUqsAusovHvy+C40VTkjjrayA +yT+Zbs4s4SUpvFhA1lw2/lHhpdTy0sUb0mMMU+Z474ld1DK26tElLwI3G6AQ/503FPQ G8kHnbeoA7tF9ranogoxJ6zPmeMOw78zjFRZBrGQsz4tIzE+9M6HZCLJAAto2c0m/0F5 6weQ== 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=zlk0pYgeFrBRJtw/N83n4t+jmPWdRVlr1V46qxOWdnE=; b=tTyeHRKBgd5FllZ+j0cIFfMrAVMLes3p/TgAmew1ev9TTQD2/3cAUN35zhhGm7q06L pqMCESfQ5V4oeJIe5q0Tq6o+VyFjYUxzuTwf0J14xI4/HTXLATjrHXNtdrXKElNdFn9Y pXtJtDz83Kqqw0zXynq+EQAx+oRNQPYAY6bgXVs+BS3fQJY3DwTl/bFutRT9Ruo5Ey8r IYKr67FnlDft28uGx7KQ8bNolkGtSEEn2qGsYWtb3lBLK3BpEkUjUo0ysCcPRE4Z6aEt T3HGSs/4YwucbZh7RBC49y2rtmSc2B66xqTXGVDnRNUxt970yyMf4ZQ2ZRGThuR47Ydv uufg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OWH0M3YC; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a6-20020a654186000000b003816043f09csi836774pgq.657.2022.03.16.20.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 20:23:05 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OWH0M3YC; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 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 E29792A276; Wed, 16 Mar 2022 20:22:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352641AbiCPTVi (ORCPT + 99 others); Wed, 16 Mar 2022 15:21:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231927AbiCPTVh (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 7029C40A3F; 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=zlk0pYgeFrBRJtw/N83n4t+jmPWdRVlr1V46qxOWdnE=; b=OWH0M3YCDaaUvZNoeBhNPzIFL8 1mOFKNuRVgUQ5Iogx2eIIw9Mj4dmnKQHT/rvRLaYy7YEu6qwyj9iN55WNZ72jUQfmwyzy+g3ArdCm oAlJIiC2gYZhXLC3XI/4G2V7k/3WrVQQ9xcFl2aKGM3A7RWgmcYT7G0VSZg8WJdKy0+mxV2KWtRsb ktMgcdtXuN9OVRcoh5mBRUTWlMiuU5Qx+f4y4gp+RBIP8e7Iy76TUNOOuokZ0LmtPn+WZG5E5NN0r p36ObkoHZue3Sl2dvNTwt8OBP6UCI2pSUL01GUxoDuJWsfMKFSZ0CcV2BnY/gDeVhh+wmf2T+ajBI rw5JcjiA==; 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 1nUZBw-00EArp-Ge; Wed, 16 Mar 2022 19:20:16 +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 1/9] virtio_blk: eliminate anonymous module_init & module_exit Date: Wed, 16 Mar 2022 12:20:02 -0700 Message-Id: <20220316192010.19001-2-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: e467cde23818 ("Block driver using virtio.") Signed-off-by: Randy Dunlap Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Paolo Bonzini Cc: Stefan Hajnoczi Cc: virtualization@lists.linux-foundation.org Cc: Jens Axboe Cc: linux-block@vger.kernel.org --- drivers/block/virtio_blk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- lnx-517-rc8.orig/drivers/block/virtio_blk.c +++ lnx-517-rc8/drivers/block/virtio_blk.c @@ -1058,7 +1058,7 @@ static struct virtio_driver virtio_blk = #endif }; -static int __init init(void) +static int __init virtio_blk_init(void) { int error; @@ -1084,14 +1084,14 @@ out_destroy_workqueue: return error; } -static void __exit fini(void) +static void __exit virtio_blk_fini(void) { unregister_virtio_driver(&virtio_blk); unregister_blkdev(major, "virtblk"); destroy_workqueue(virtblk_wq); } -module_init(init); -module_exit(fini); +module_init(virtio_blk_init); +module_exit(virtio_blk_fini); MODULE_DEVICE_TABLE(virtio, id_table); MODULE_DESCRIPTION("Virtio block driver");