Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1064259pxp; Thu, 17 Mar 2022 01:53:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3yFy9ur+Mrxr2ylQ4t4yfCGdAIqO6J+1Yu5rkXtEVwT7UzbJwZUIBGBm3OB9uAUCtWFxZ X-Received: by 2002:a17:906:a1c8:b0:6da:a635:e402 with SMTP id bx8-20020a170906a1c800b006daa635e402mr3455973ejb.598.1647507200455; Thu, 17 Mar 2022 01:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647507200; cv=none; d=google.com; s=arc-20160816; b=Uo92CkpuBVUlrgIQu1W0tHRz9EIFiDT/SOHd7RfEBnkZ8JDLctup5fmVcziNMXpDtp xYXEboT+6pP+GJMwLS+JLPMKisgSCeouoUDZBcNTmpwuPW3DCTqWJRsFojYJ2Qep7PXL iUuHsnkZ39dD4wPIYAA2yNBioQnatbbkkb/nBh1+cHRpRKAaUISY7ZnlzpFv5pUiGBHn mcxnsMw4kNMkcfiVYBNOCZPM/mMRzAJzwxhZVKPWwQt8YzZS3MjM51kMbBp891WwH3QF ids0pA85brwfbTvdV0dDjvahF0NT2JOZmGh7i9Nm7U1SCTmvnKa1JAPMyYWRxIGUwNjN YFRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sVx9DgD8AwAJ8+xHbwqIFqUi1dP3yjGM90jTXU92h6o=; b=QUmZpcOdyl7vMb8LBvRRNMtoeLylpqhAbmr8EOO2dd0WmipaunqKMMd69AMAEy3vbJ Wy98OZXShrrIu6/WnOwyVInkXSKKjNoqsk1bbQnDLXgJkhl4jVnNRwa0ChuN1WmOjQAJ LxTHCfYHCYZaho9VpWBasDaNhXbMC5ODa2a0bdBZDphr87VeTxLuyo/yTucAi1sC+foa rK+fFmxdRheZOMSO5/dZT7vOehqDCp0+rPpAJ9SA8kM201IpceiNCofMbxA5vALSgeHh uQMVZiTYeOKNLDd6SP1zB3fY5J3iKRpW6rVmyCDa6sgW57hKg2bkwNuTYRdHCf1gcAk7 x3iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JcOWtwWc; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d2-20020a50e402000000b00418c2b5bf87si1116614edm.617.2022.03.17.01.52.46; Thu, 17 Mar 2022 01:53:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JcOWtwWc; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230298AbiCQIrj (ORCPT + 99 others); Thu, 17 Mar 2022 04:47:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231476AbiCQIri (ORCPT ); Thu, 17 Mar 2022 04:47:38 -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 766661C947D for ; Thu, 17 Mar 2022 01:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647506781; 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=sVx9DgD8AwAJ8+xHbwqIFqUi1dP3yjGM90jTXU92h6o=; b=JcOWtwWcmcamaAT0mIAc+hlrG5AvD97EDvvTyyNIsxJvjXHgzJo0A0cA8FPz15mJxa001I fCgyiirt9fJjYOpAr4DXdEzmX3vv33IHpprPay36JGUGMQUNUlFcalnUVeBy4k8F1QO53D 39QlTl9d6dRxSqxxx/QCfUX/gJT6LWA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-635-7I8ftN2EOIe68vrg6AndoA-1; Thu, 17 Mar 2022 04:46:20 -0400 X-MC-Unique: 7I8ftN2EOIe68vrg6AndoA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5987B1C03385; Thu, 17 Mar 2022 08:46:18 +0000 (UTC) Received: from localhost (unknown [10.39.194.252]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9FB7153CF; Thu, 17 Mar 2022 08:46:13 +0000 (UTC) Date: Thu, 17 Mar 2022 08:46:12 +0000 From: Stefan Hajnoczi To: Randy Dunlap Cc: linux-kernel@vger.kernel.org, "Michael S. Tsirkin" , Jason Wang , Paolo Bonzini , 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@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: Re: [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit Message-ID: References: <20220316192010.19001-1-rdunlap@infradead.org> <20220316192010.19001-6-rdunlap@infradead.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3AeFxmP0HGbN94e3" Content-Disposition: inline In-Reply-To: <20220316192010.19001-6-rdunlap@infradead.org> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_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 --3AeFxmP0HGbN94e3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 16, 2022 at 12:20:06PM -0700, 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. >=20 > Give each of these init and exit functions unique driver-specific > names to eliminate the anonymous names. >=20 > Example 1: (System.map) > ffffffff832fc78c t init > ffffffff832fc79e t init > ffffffff832fc8f8 t init >=20 > 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 >=20 > Fixes: 4fe74b1cb051 ("[SCSI] virtio-scsi: SCSI driver for QEMU based virt= ual 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(-) >=20 > --- 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 =3D virtscsi_remove, > }; > =20 > -static int __init init(void) > +static int __init virtio_scsi_init(void) > { > int ret =3D -ENOMEM; > =20 > @@ -1020,14 +1020,14 @@ error: > return ret; > } > =20 > -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); > =20 > MODULE_DEVICE_TABLE(virtio, id_table); > MODULE_DESCRIPTION("Virtio SCSI HBA driver"); >=20 Reviewed-by: Stefan Hajnoczi --3AeFxmP0HGbN94e3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmIy9VQACgkQnKSrs4Gr c8geUQgAw2TOHcSEnWK4BJz/IELyWnu6TzVbAIIgDLtl/bUwEsgSwAljdB7zw8K/ 6MBcR6ner6oRCLk6Vx0ltNqrAeaxRZOAPqnj1uBP+FZ13in/KYZNz4XkdVZpRbDj Kqgko1egvrgmbZlvwbRA15UnNntchizS8VfXd45jyGUFLD/zl1JvIKGDVU31vt7i ZLPUWxMdPG2LwGpgBmTEQnX9LQbK0/d2+f8AEnMAzn1SmIKp8ZgCTYwQrpuD/1xU eqYoCjQVhNAk7kwkL3XeL/1m0d3b+UVvNRIGaEQBo2Ia8ZJcub7kua6KFb3wfYyK AQM+SWYvzoTl9ws3BUL4BqsEgEItBA== =iao2 -----END PGP SIGNATURE----- --3AeFxmP0HGbN94e3--