Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp990557pxp; Wed, 16 Mar 2022 23:41:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWnB70trtxLmLbvKantL6USW8koNCWqLFzEhOCh2z8tRhIVMw4xtKN9QV6yyklZQwaksvC X-Received: by 2002:a63:1766:0:b0:381:71f9:cd44 with SMTP id 38-20020a631766000000b0038171f9cd44mr2557043pgx.446.1647499283145; Wed, 16 Mar 2022 23:41:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647499283; cv=none; d=google.com; s=arc-20160816; b=wFT7lacosE4PHg6w1NJL8Uw0m+qg5woql72w4vat/tXRXiqCoJ15CvZpDIOm+C/L1Z 15Sh8BQs5S/00enCSJM4g3SFKSV0eOvQUjsTyazt6vWObVIOcL+V+glinp9nWAj0l9VS 86q3Y4D2ji4pVScvwWP96lTsHtwCgcvDyexNePtl331fDyyOjzmDAmqvT2RGBuf4cx2V rh7HIVNgPlJUgqhr0LLL9Xz95gKhcsst6VoxX5Lz7nE3jw72Fd2ruew4fU+3qMNR6URK OAxtkscs+9lnS1G34ImngBWFMi3IxIHhCzwV8plsi+GmrI7tp5fNGbSmR4TpmXvvjrW4 CFsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=VdUR6nzOC/8O0v+PINEYQA8hLCMnHSUIAPMWwkW08rs=; b=cAQNrQ0joYx2yfoTvpFQMALyZjucH1FRswktWQRF+we8N+GeOuXWtxgtARuSFB++cu zDgQcCZM3wEFRttO68DdXIr1eAO+VS3PGPp1bwBzDCD6BSy8XCKcjbn8PxglB1FFBBgl 9aP3c5PX4Djb/LNuQ5Pc3sQ/OobFEZCWhC/8hA8wvewHIQs5YSjAE8nmdED/qMbCTvCU IHyMdaJkskfb5Hri54TAVjq3AeaGd0j5N5vl7VVHeXj2TTRGFnt8BP1Ed9ZnVOvEYyeF 6NG2/6crawXZkJAwTqAOTgUK1ngrvmwzj75shm4mTeI80OIcF65/SkZftA47kzc57YNe xMkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Wyfm3m60; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m12-20020a170902bb8c00b001530b0d6a23si4006726pls.609.2022.03.16.23.41.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:41:23 -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=@redhat.com header.s=mimecast20190719 header.b=Wyfm3m60; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 140FD25FD51; Wed, 16 Mar 2022 22:31:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230189AbiCQD2E (ORCPT + 99 others); Wed, 16 Mar 2022 23:28:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233103AbiCQD14 (ORCPT ); Wed, 16 Mar 2022 23:27:56 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 83070344C0 for ; Wed, 16 Mar 2022 20:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647487599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VdUR6nzOC/8O0v+PINEYQA8hLCMnHSUIAPMWwkW08rs=; b=Wyfm3m60PtMDs9J980olZsBlkeVIRdwuebiXZVqR/xCw2kGY60wv6+aE80qaAaiMFwEGDM 7YRqS4nHgBrBPJ+pBHMKwcrRNiUoG52KtSnMdK0lsMRTr0fNEcoYGSXhHXgyBofffJUzFa tIGbVspPUaqcrKVF86iqziLojiuccKA= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-157-KbmQmiozOc-iWy4AqivSqQ-1; Wed, 16 Mar 2022 23:26:38 -0400 X-MC-Unique: KbmQmiozOc-iWy4AqivSqQ-1 Received: by mail-lf1-f71.google.com with SMTP id x23-20020ac25dd7000000b004492a3f2ecdso738330lfq.12 for ; Wed, 16 Mar 2022 20:26:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VdUR6nzOC/8O0v+PINEYQA8hLCMnHSUIAPMWwkW08rs=; b=J2renV5tyLZbeT2nja15n6KwBoumkc07vg4cWg4NpbC27OQeR49xxPnL1jHMhtdG9f jpgon9eFrdxfta9B9v6jtfzYlRx2WXzVXX1E8vuc28lDmzTR5EaKLnLJmlZOc5g9zCAS BeUBrg1dOEaCgJWGUoHEllBaV+WKi1Bio/h//hFGgkO1rsb0ICqQIUXxbL94vR7uzC0R 9+Ov2pdtJr2Jtn3/tB1m0vLn6u83AQ2xVK7OqyQI7yq931In+ui+ak/4vOPAyjtks/Yp wnG5kw0QngyZ8A6x9FYzJQKBiMiWFvEFkjhLI3E4KiwFrxe5qCNyenmc/ZN3JzGyV+Dj xEbg== X-Gm-Message-State: AOAM533G38bW6ca/m2iElpCB2M+gRTpT7aWlfTTDmFJ5Gm68tBGvk7RM VXBVjo4rkvZ7kXxsHUSQXKplDG+VwVLa0EoH3Aei8gOoUFRDtJHW88vBpjx8tZcukm19szUBypp D+bGSsIwVKLfzlcrNIqIbBFAXPz5tykrjFxWWk+Xb X-Received: by 2002:a2e:a490:0:b0:248:8f0:e4ee with SMTP id h16-20020a2ea490000000b0024808f0e4eemr1585875lji.97.1647487596333; Wed, 16 Mar 2022 20:26:36 -0700 (PDT) X-Received: by 2002:a2e:a490:0:b0:248:8f0:e4ee with SMTP id h16-20020a2ea490000000b0024808f0e4eemr1585821lji.97.1647487596075; Wed, 16 Mar 2022 20:26:36 -0700 (PDT) MIME-Version: 1.0 References: <20220316192010.19001-1-rdunlap@infradead.org> <20220316192010.19001-2-rdunlap@infradead.org> In-Reply-To: <20220316192010.19001-2-rdunlap@infradead.org> From: Jason Wang Date: Thu, 17 Mar 2022 11:26:24 +0800 Message-ID: Subject: Re: [PATCH 1/9] virtio_blk: eliminate anonymous module_init & module_exit To: Randy Dunlap Cc: linux-kernel , "Michael S. Tsirkin" , 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?B?TWljaGHFgiBNaXJvc8WCYXc=?= , 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 , linux-block@vger.kernel.org, linux-crypto@vger.kernel.org, RDMA mailing list , linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, nouveau@lists.freedesktop.org, virtualization , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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=unavailable 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 On Thu, Mar 17, 2022 at 3:25 AM 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: 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 > --- Acked-by: Jason Wang > 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"); >