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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7882EC4321E for ; Fri, 18 Mar 2022 22:46:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234187AbiCRWrU (ORCPT ); Fri, 18 Mar 2022 18:47:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241343AbiCRWrT (ORCPT ); Fri, 18 Mar 2022 18:47:19 -0400 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C55422C6F3 for ; Fri, 18 Mar 2022 15:45:58 -0700 (PDT) Received: by mail-oo1-xc2c.google.com with SMTP id j7-20020a4ad6c7000000b0031c690e4123so11874405oot.11 for ; Fri, 18 Mar 2022 15:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ekiD2sX45IwGk6wtsqdwxLttTAGZcGccRjZl1i6g1JA=; b=dMDapo5gWo0mYQwoT0A/aOZqMdPyZSCOVsL5zPGffJvLJZp0AfN2E9xdlck/nSLv/N hEsSe5KNbjsmefIhgIIv1yDVHMP+6YIgd44fW9U2d/c1Akfns382n70WbM/10yIkuHjZ SUNIZp82WOT2MEcG49QwDBCrffF4++Gcu4CkY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ekiD2sX45IwGk6wtsqdwxLttTAGZcGccRjZl1i6g1JA=; b=01Oer/JL8tWB2+nDgr7sPAUTKqRPFCtJDaBGXTJKg1FFLxOswlCFh6pssjiusTk6vk 57l7zJLp5qlaZkS3qqrwvlTA2XFG4/kd1GbOj9FRSImLRMgKniv/XFIhLKCJ2twJ2UwH ldFTxtQ7CF5IQJ/eb4/K+Rm+uHD8mAckFoGzTJycsr9Pnh6D56YPBX2SCklxBHWo6J1T y0EqWDsXfIT1OsvcjZ3ivQIKsBdf+ctfezGyO00JdEhaombce3vAEsxQ/t//+Vf2N2D0 2eT/9WjrrLZVG28FmUWfIM/E3ZpMQsnVGP/gH8BMzZPMe2La/lp4MxMdhOagTMFXaulY h0iw== X-Gm-Message-State: AOAM532/+NTmc9+H6JupqhGRES/HvS7a6p6IknEaWbJAPEh9sp7E7Lde Umwr/OF8tjrwQ97CMk7aQ/lIhg== X-Google-Smtp-Source: ABdhPJziihDBziDyTkE7iKcLTBW6BUUFUpCgkLWdsk/9MySxxcozoxXb4xoR4U6FbxLxPWes+cEMkA== X-Received: by 2002:a05:6820:814:b0:322:b1b2:2456 with SMTP id bg20-20020a056820081400b00322b1b22456mr3591951oob.0.1647643557718; Fri, 18 Mar 2022 15:45:57 -0700 (PDT) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id x12-20020a056830244c00b005ad233e0ba3sm4330223otr.48.2022.03.18.15.45.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Mar 2022 15:45:57 -0700 (PDT) Subject: Re: [PATCH 7/9] usb: usbip: eliminate anonymous module_init & module_exit To: Randy Dunlap , linux-kernel@vger.kernel.org Cc: "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?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Sebastian Andrzej Siewior , Krzysztof Opasiak , Igor Kotrasinski , Valentina Manea , 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, Shuah Khan References: <20220316192010.19001-1-rdunlap@infradead.org> <20220316192010.19001-8-rdunlap@infradead.org> From: Shuah Khan Message-ID: <282f4857-7b4f-810e-af0e-e9ca8129c7fc@linuxfoundation.org> Date: Fri, 18 Mar 2022 16:45:54 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20220316192010.19001-8-rdunlap@infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 3/16/22 1:20 PM, 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: 80fd9cd52de6 ("usbip: vudc: Add VUDC main file") > Signed-off-by: Randy Dunlap > Cc: Krzysztof Opasiak > Cc: Igor Kotrasinski > Cc: Greg Kroah-Hartman > Cc: Valentina Manea > Cc: Shuah Khan > Cc: Shuah Khan > Cc: linux-usb@vger.kernel.org > --- > drivers/usb/usbip/vudc_main.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > --- lnx-517-rc8.orig/drivers/usb/usbip/vudc_main.c > +++ lnx-517-rc8/drivers/usb/usbip/vudc_main.c > @@ -28,7 +28,7 @@ static struct platform_driver vudc_drive > > static struct list_head vudc_devices = LIST_HEAD_INIT(vudc_devices); > > -static int __init init(void) > +static int __init vudc_init(void) > { > int retval = -ENOMEM; > int i; > @@ -86,9 +86,9 @@ cleanup: > out: > return retval; > } > -module_init(init); > +module_init(vudc_init); > > -static void __exit cleanup(void) > +static void __exit vudc_cleanup(void) > { > struct vudc_device *udc_dev = NULL, *udc_dev2 = NULL; > > @@ -103,7 +103,7 @@ static void __exit cleanup(void) > } > platform_driver_unregister(&vudc_driver); > } > -module_exit(cleanup); > +module_exit(vudc_cleanup); > > MODULE_DESCRIPTION("USB over IP Device Controller"); > MODULE_AUTHOR("Krzysztof Opasiak, Karol Kosik, Igor Kotrasinski"); > Thanks for fixing this. Acked-by: Shuah Khan thanks, -- Shuah 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 253E2C433FE for ; Sun, 27 Mar 2022 07:44:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 72ADB10E125; Sun, 27 Mar 2022 07:44:05 +0000 (UTC) Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDE0510E2BB for ; Fri, 18 Mar 2022 22:45:58 +0000 (UTC) Received: by mail-oo1-xc2b.google.com with SMTP id h16-20020a4a6f10000000b00320507b9ccfso11886270ooc.7 for ; Fri, 18 Mar 2022 15:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ekiD2sX45IwGk6wtsqdwxLttTAGZcGccRjZl1i6g1JA=; b=dMDapo5gWo0mYQwoT0A/aOZqMdPyZSCOVsL5zPGffJvLJZp0AfN2E9xdlck/nSLv/N hEsSe5KNbjsmefIhgIIv1yDVHMP+6YIgd44fW9U2d/c1Akfns382n70WbM/10yIkuHjZ SUNIZp82WOT2MEcG49QwDBCrffF4++Gcu4CkY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ekiD2sX45IwGk6wtsqdwxLttTAGZcGccRjZl1i6g1JA=; b=LH3hGx+wm8Kh1sZgQ08ZeTkyfpcHGefhN0H5B06VmSpZTniLoHUeSjFpuSBi24zVaA Spt54QBIE6eb2lMV0TfbFyppgLf7vuGdnavYk0q4heqb6y81fzkByFL9BMDDKY1kyJGr KvSktzu/1IA53V1RY79N8n/pIBBF4k+vuLJu3r91CZrlnuhe1Bl+w9/vW/qdlhh86vld XSz4SSNH4TdDVvHATSmJXizxBd7bkVlmaahjaEwmCzANrolWpbNeo5Yz/xK4j1mHEr/A 2QlSgHggzfCIke98ViO/61VG4m/PsTHup5qi53BTIOj7PbCJ1xxcvepaIrM0NijeeUJT FTMw== X-Gm-Message-State: AOAM531sXE2+ldM4Iw4Feg1VgPseIHML9O/xhlzypdGGwNORsCoQ9XAM J9cJu0EVuMIdA63arMALTs0o2g== X-Google-Smtp-Source: ABdhPJziihDBziDyTkE7iKcLTBW6BUUFUpCgkLWdsk/9MySxxcozoxXb4xoR4U6FbxLxPWes+cEMkA== X-Received: by 2002:a05:6820:814:b0:322:b1b2:2456 with SMTP id bg20-20020a056820081400b00322b1b22456mr3591951oob.0.1647643557718; Fri, 18 Mar 2022 15:45:57 -0700 (PDT) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id x12-20020a056830244c00b005ad233e0ba3sm4330223otr.48.2022.03.18.15.45.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Mar 2022 15:45:57 -0700 (PDT) To: Randy Dunlap , linux-kernel@vger.kernel.org References: <20220316192010.19001-1-rdunlap@infradead.org> <20220316192010.19001-8-rdunlap@infradead.org> From: Shuah Khan Message-ID: <282f4857-7b4f-810e-af0e-e9ca8129c7fc@linuxfoundation.org> Date: Fri, 18 Mar 2022 16:45:54 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20220316192010.19001-8-rdunlap@infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sun, 27 Mar 2022 07:44:03 +0000 Subject: Re: [Nouveau] [PATCH 7/9] usb: usbip: eliminate anonymous module_init & module_exit X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: x86@kernel.org, Andy Lutomirski , "Michael S. Tsirkin" , Peter Zijlstra , nouveau@lists.freedesktop.org, Jason Wang , Dave Hansen , Valentina Manea , virtualization@lists.linux-foundation.org, 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 , Herbert Xu , Jens Axboe , linux-scsi@vger.kernel.org, "Martin K. Petersen" , Greg Kroah-Hartman , linux-usb@vger.kernel.org, Florian Westphal , netfilter-devel@vger.kernel.org, linux-crypto@vger.kernel.org, Igor Kotrasinski , Paolo Bonzini , Saeed Mahameed , "David S. Miller" Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" On 3/16/22 1:20 PM, 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: 80fd9cd52de6 ("usbip: vudc: Add VUDC main file") > Signed-off-by: Randy Dunlap > Cc: Krzysztof Opasiak > Cc: Igor Kotrasinski > Cc: Greg Kroah-Hartman > Cc: Valentina Manea > Cc: Shuah Khan > Cc: Shuah Khan > Cc: linux-usb@vger.kernel.org > --- > drivers/usb/usbip/vudc_main.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > --- lnx-517-rc8.orig/drivers/usb/usbip/vudc_main.c > +++ lnx-517-rc8/drivers/usb/usbip/vudc_main.c > @@ -28,7 +28,7 @@ static struct platform_driver vudc_drive > > static struct list_head vudc_devices = LIST_HEAD_INIT(vudc_devices); > > -static int __init init(void) > +static int __init vudc_init(void) > { > int retval = -ENOMEM; > int i; > @@ -86,9 +86,9 @@ cleanup: > out: > return retval; > } > -module_init(init); > +module_init(vudc_init); > > -static void __exit cleanup(void) > +static void __exit vudc_cleanup(void) > { > struct vudc_device *udc_dev = NULL, *udc_dev2 = NULL; > > @@ -103,7 +103,7 @@ static void __exit cleanup(void) > } > platform_driver_unregister(&vudc_driver); > } > -module_exit(cleanup); > +module_exit(vudc_cleanup); > > MODULE_DESCRIPTION("USB over IP Device Controller"); > MODULE_AUTHOR("Krzysztof Opasiak, Karol Kosik, Igor Kotrasinski"); > Thanks for fixing this. Acked-by: Shuah Khan thanks, -- Shuah