From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19BAAC433EF for ; Sun, 20 Mar 2022 12:04:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A79BF408FB; Sun, 20 Mar 2022 12:04:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JYKzMVdSb-e2; Sun, 20 Mar 2022 12:04:40 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3B505408F7; Sun, 20 Mar 2022 12:04:40 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 12DE6C0012; Sun, 20 Mar 2022 12:04:40 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id ED625C000B for ; Sun, 20 Mar 2022 12:04:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id D87A4408FD for ; Sun, 20 Mar 2022 12:04:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iurOpmPixr9L for ; Sun, 20 Mar 2022 12:04:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 229D7408F8 for ; Sun, 20 Mar 2022 12:04:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647777877; 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=pfT/FhM65DQKRvRUzD2KeWz3oDwCgvpb4tTTJtJbjgQ=; b=PDFQFf5V5N/hF/Sd/ykFFccAhPnqIFWsuIG2hdZIdiJflWUEAiFTGd4MFPNKBUTtOv7Uuc OGm9lPIpzcidFPlnv2McAR3pIzR4eHcNPqCAvWijxjPKxgM3kgVYZzrti3VRyAtMDGk3xm Tmd0iljTnx/BmMzoz7BDUQPN+JOxnHw= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-571--qexkuQMMkSjbFPNu2o06A-1; Sun, 20 Mar 2022 08:04:35 -0400 X-MC-Unique: -qexkuQMMkSjbFPNu2o06A-1 Received: by mail-ej1-f70.google.com with SMTP id hg13-20020a1709072ccd00b006dfa484ec23so3509760ejc.8 for ; Sun, 20 Mar 2022 05:04:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pfT/FhM65DQKRvRUzD2KeWz3oDwCgvpb4tTTJtJbjgQ=; b=oAtqPeEVPEkCWAcciZuP695Bt25EecG0uYsikqUQtd5XZjfLCceKOYrxhmhbAoEG8h 6jEBTQgUBz4Lp9IntRypnfXtS7lNvbOjw3pUtzSAKcUx00oCtK/OyPgWbAxVizF43n3a yzGsfYXmU/8mYU7xf+0i/ueximJFANIrcWgbGofEqbgiYZLI2staIYDZCFLaKCsW49zk 4rXAHgJfKWfbr4cupgkvwzMMfGKirtWENwxouyCRjEzknxSjfL/UeWUvTpV3L49RA6K+ JMDFA4U3eeqoo6+r0R7JtxR/J8RzlCluq1eodah9Td5EOd4ldmArKRWikqxEwFgimKE4 mD0Q== X-Gm-Message-State: AOAM532wToDMaFCB2myOT85ZLrnNCqgcWkQ14kevoPthNiwM7FZhR4/X fmsziue91LXFetwYqWTw2NOgY0S3RAG6Rk0wl0a2ah59+ukpxHRk9R4daz309BfTVCJUbEPX75c DQDGqMhT5kgVG0Q5cWRx1CbLgHJUOXgyJLhdGPh5GRA== X-Received: by 2002:a17:907:9706:b0:6db:566a:4408 with SMTP id jg6-20020a170907970600b006db566a4408mr16470488ejc.374.1647777873718; Sun, 20 Mar 2022 05:04:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx89ppvPKr6BvvjBnbbPf3CkRgoqozB02ZyScIP5D34LakZNdud2DzXyDuKhCsgHIy5z//Zgg== X-Received: by 2002:a17:907:9706:b0:6db:566a:4408 with SMTP id jg6-20020a170907970600b006db566a4408mr16470444ejc.374.1647777873440; Sun, 20 Mar 2022 05:04:33 -0700 (PDT) Received: from redhat.com ([2.55.132.0]) by smtp.gmail.com with ESMTPSA id gb3-20020a170907960300b006dfafbb4ba4sm3340411ejc.83.2022.03.20.05.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Mar 2022 05:04:32 -0700 (PDT) Date: Sun, 20 Mar 2022 08:04:22 -0400 From: "Michael S. Tsirkin" To: Randy Dunlap Subject: Re: [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit Message-ID: <20220320080414-mutt-send-email-mst@kernel.org> References: <20220316192010.19001-1-rdunlap@infradead.org> <20220316192010.19001-6-rdunlap@infradead.org> MIME-Version: 1.0 In-Reply-To: <20220316192010.19001-6-rdunlap@infradead.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: x86@kernel.org, Andy Lutomirski , Peter Zijlstra , nouveau@lists.freedesktop.org, Dave Hansen , Valentina Manea , Karol Herbst , Krzysztof Opasiak , Eli Cohen , netdev@vger.kernel.org, Shuah Khan , Thomas Gleixner , "H. Peter Anvin" , Arnd Bergmann , Leon Romanovsky , linux-rdma@vger.kernel.org, Ingo Molnar , Jozsef Kadlecsik , coreteam@netfilter.org, Jakub Kicinski , Sebastian Andrzej Siewior , Pablo Neira Ayuso , Joachim Fritschi , Felipe Balbi , Amit Shah , "James E.J. Bottomley" , Steven Rostedt , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , linux-block@vger.kernel.org, Pekka Paalanen , Borislav Petkov , Stefan Hajnoczi , Shuah Khan , Jussi Kivilinna , virtualization@lists.linux-foundation.org, Herbert Xu , Jens Axboe , linux-scsi@vger.kernel.org, "Martin K. Petersen" , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Florian Westphal , linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, linux-crypto@vger.kernel.org, Igor Kotrasinski , Paolo Bonzini , Saeed Mahameed , "David S. Miller" X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" 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. > > 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 If this is done tree-wide, it's ok to do it for virtio too. Acked-by: Michael S. Tsirkin No real opinion on whether it's a good idea. > --- > 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"); _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization