Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3023066rdh; Mon, 27 Nov 2023 05:03:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGUvVow4l4pp+yPVWWqNVi6taiZsyd6a5MJGxgwz86F35hlLz3cpUDK0Rl5ggIq/VBgMxN9 X-Received: by 2002:a9d:784d:0:b0:6d3:2d62:a93d with SMTP id c13-20020a9d784d000000b006d32d62a93dmr13511846otm.29.1701090209418; Mon, 27 Nov 2023 05:03:29 -0800 (PST) Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id di13-20020a0568303a0d00b006d649815548si1926663otb.175.2023.11.27.05.03.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 05:03:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ncn6fuhy; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 07ACC80942C4; Mon, 27 Nov 2023 05:03:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233540AbjK0NDD (ORCPT + 99 others); Mon, 27 Nov 2023 08:03:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233429AbjK0NDC (ORCPT ); Mon, 27 Nov 2023 08:03:02 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BC579B; Mon, 27 Nov 2023 05:03:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701090189; x=1732626189; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=7vt5/l1+JSFHAIX3O0PvfJWOzQ62k3pMPCe5HrbZd5E=; b=Ncn6fuhyriq5FV8WeghCa3zTWMrmM0kc5xyMcN4YCRVq+WnNr9ERRcf5 9G1jOZcIwlTXnRW68nMLVy6/UCsvUo/yMkGVXFf7kqGwv5pd+SrxV8eUb mbx8k6oz/YGte7U9OYwkA8JtNoTnC6BvTPlrbI9vgYf/Jd/oTjXx0vuPw 5AILPpxYCrkbW2NUcdIVppG2/Agq4Di4xKO45NDd78lE2Qx4yWhybNC+/ 27HwhY7Dbe2OwMMtyXUE+reLF6ukLYVG07Yfp1FtX94HzV0K4FbPbHfL0 UMrXh2kwQhibyLuZtIFL++6zM+rrTVDeXq3jSrr56Y3h9R94yQFGXvLaO g==; X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="5948235" X-IronPort-AV: E=Sophos;i="6.04,230,1695711600"; d="scan'208";a="5948235" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 05:02:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="859042508" X-IronPort-AV: E=Sophos;i="6.04,230,1695711600"; d="scan'208";a="859042508" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by FMSMGA003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 27 Nov 2023 05:02:44 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 27 Nov 2023 05:02:44 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 27 Nov 2023 05:02:42 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Mon, 27 Nov 2023 05:02:42 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Mon, 27 Nov 2023 05:02:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ehddo5RxwKmNBcm/KoeEd1hfbTpJyVlv+tTu0hFQa7FagRpXK3C/x0noKI6R76q/Rdm6tNXJzPpfBJl0TcREtVJ3rJ3d+5BkaaWzd2BJNJYPdw43LpGyat+lc/pi52SwrEYtXQxtRmiwpySEjtRcvuKppSVgvoW/ATYgym1qic8ZDVF65Gys431VizRtoM+ZtSDKmz0TZBYEAVVwFnoQlw1BfXPefq4Xu8q8utrtnt0oBPQ2h5p1gBPJgITWrwJRZG8cFghzXXbKxLL7dY0nZTzvXsdtBwONYowt1GcbHFsezbUCpXCwCxATywndlUTx845HOX81ltuY9jI1czDQOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=blHG0mlV13DRx/jBgdK2qaxytfa6EChF3jo2qDFl/ws=; b=JfwmXJz6Q+rOYFoVYanjDDiwzDkko5BVMr5ZoxgwVLzaGsa3GMbKoqtM82Nxa2jhncp5iUYqZXwR3VfNgNHyPxuUrXw/THQOHEwdQZAyFt+QRp1YGYyXR6vRUfTyIx5QVWxxkOJrJkWMw+w2i6oPA61hjWzyWGFU6J8MfcTeY7M3nolqSjeawjgkImFqNIV7DvFfKrBqiOPUtoXFTIa4Rm/BVz8kKR28TDUZbv5ESqmbRcJ9NHIeYkzNe8kDKVtylV4zAg41qgPoxp1gS3+xnOw8wPUKRi5YSe8Vgo9DOKtA5c00l3PdzYEY2fV1IU0I2fzNF5V7BNaabZeNxB9qng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) by CH0PR11MB5395.namprd11.prod.outlook.com (2603:10b6:610:ba::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.29; Mon, 27 Nov 2023 13:02:28 +0000 Received: from DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::36be:aaee:c5fe:2b80]) by DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::36be:aaee:c5fe:2b80%7]) with mapi id 15.20.7025.022; Mon, 27 Nov 2023 13:02:28 +0000 Message-ID: <673d222c-52ee-4b65-9dff-0357ed0726a8@intel.com> Date: Mon, 27 Nov 2023 14:01:59 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net 1/1] net: phylink: Add module_exit() To: Gan Yi Fang CC: Looi Hong Aun , Voon Weifeng , Song Yoong Siang , "Lai Peter Jun Ann" , Russell King , Andrew Lunn , Heiner Kallweit , "David S . Miller" , Eric Dumazet , "Jakub Kicinski" , Paolo Abeni , =?UTF-8?Q?Marek_Beh=C3=BAn?= , , References: <20231127101603.807593-1-yi.fang.gan@intel.com> Content-Language: en-US From: Alexander Lobakin In-Reply-To: <20231127101603.807593-1-yi.fang.gan@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR2P281CA0129.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:9e::16) To DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR11MB3625:EE_|CH0PR11MB5395:EE_ X-MS-Office365-Filtering-Correlation-Id: e63c89ea-17b7-448d-5958-08dbef491bfc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /fQPo+z9OMguDoplgvkp4UZkSIxm1ZN1EKK4P/YgQh5gXmiJLfusP3qvRyeUel7yiDHbHUIt4Wr0me5MOkV9C7WAnAyxydujiZX2/GEn/7a3hcjy7QAZMWM4LcdaeWfFhDx+Vw3izaomsBQoFyV/SuG/V6nGmWvcTWgoWNRMTfA8w7Wp6xqm2UcEV988MCTTRDsT0RxGazFRy5BW8dw9ut9UXoIF1cv8Au6WGq7vrCcAkmL4a8KB3098PvoSojiocVf41GZuNcEkoBVTVuZla52zxso05IUWb8Md1YToWe0heWMYwnTCmeD+R202yi0ESy1gsF+oJ397Fz+Z31fJ9vLX8d+NfS8In0/MJfaKDgABt55CtB3iB0pr3qiVZycBSDgnBoBhjm1Fi3Z9nAK9FS5CXx49hFfq2dlRSHStOKZwwkbZfawoe9tcO+c0bE1aLfsCtn21BIKeFSO/avyCxLCHHn8waokupjowVTU7PaLaBGvUoU52/7VkZ7PgSTKlJlWrDwdeRxgJ5JR8DGiGa+RzwjRXf2ju5pfeJwpH4ka0SiQYPb77C9MLDwaBi3dtL70RiWM4RprhR9o8pFCtvidFuLUfs4ePYnM8WuObSYH6Po9I2Q7ycXS3kxHqGu7vi2xASjQIr8qR0+0BS3bepw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB3625.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(39860400002)(366004)(346002)(376002)(396003)(230922051799003)(1800799012)(451199024)(186009)(64100799003)(83380400001)(38100700002)(31686004)(82960400001)(8936002)(31696002)(8676002)(6512007)(6506007)(6666004)(6862004)(6636002)(316002)(37006003)(66556008)(66476007)(66946007)(54906003)(86362001)(4326008)(7416002)(6486002)(478600001)(5660300002)(2906002)(41300700001)(36756003)(26005)(2616005)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Rkt2VU84VDlvMTlNNGZwZEx6UjNLUWFaYXI2dnRnUnArUlltTUJFRTIzR2dO?= =?utf-8?B?d3IyZ2YzZWxTWXRGTWp3aU54Vy9tWi9uUG81QzVvWlFUR29Va1VRZnJnMnBF?= =?utf-8?B?anlZMmtHN2RKaHJPS054UmNmSHFNOHp6UTZaRmYvNmovZHhaSFQ3TGJNczN0?= =?utf-8?B?NmpmT0dpeHNLNHRjZ1d5YWhndjEyRU1QQ2RSWjdqck5SWTc3bjMrL2phMDNJ?= =?utf-8?B?RlZHUE5KSjFybzJFWFhWSUVzc0JjM0R0L0NKWU4xSmhMYkNJYlhZdWZSQUI0?= =?utf-8?B?RFl4eXBab2Q5ZWhOMnFHRCtHY2VYTHc1dkZqSGRTc00waU5zdlROWVVQK3Rk?= =?utf-8?B?R1pxaGVydjI5Sis5VEllcFhLckJkeWpKbUhVLzN3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-MS-Exchange-CrossTenant-Network-Message-Id: e63c89ea-17b7-448d-5958-08dbef491bfc X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3625.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2023 13:02:28.5446 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4+twXevOjVU1RpGQX9gNvAaLcFcNrvhIua8wU/G1+Vef5Qy2UDlHf/cpbhMPd8Mvf5dn+McInA7jDJM7SvlZXo4nZ0QpuqIOV95L9Pfw7Nc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5395 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 27 Nov 2023 05:03:26 -0800 (PST) From: Gan Yi Fang Date: Mon, 27 Nov 2023 18:16:03 +0800 > From: "Gan, Yi Fang" Please fix your Git vs mail client settings, so that your own patches won't contain "From:" with your own name. I'd suggest using "Gan Yi Fang", as that Intel's versions with commas (,) aren't optimal for mailing lists and development. > > In free_module(), if mod->init callback is defined but mod->exit callback > is not defined, it will assume the module cannot be removed and return > EBUSY. The module_exit() is missing from current phylink module drive > causing failure while unloading it. > > This patch introduces phylink_exit() for phylink module removal. > > Fixes: eca68a3c7d05 ("net: phylink: pass supported host PHY interface modes to phylib for SFP's PHYs") > Cc: # 6.1+ > Signed-off-by: Lai Peter Jun Ann > Signed-off-by: Gan, Yi Fang > --- > drivers/net/phy/phylink.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c > index 25c19496a336..7121503c9259 100644 > --- a/drivers/net/phy/phylink.c > +++ b/drivers/net/phy/phylink.c > @@ -3724,7 +3724,10 @@ static int __init phylink_init(void) > return 0; > } > > +static void __exit phylink_exit(void){} > + > module_init(phylink_init); > +module_exit(phylink_exit); This pattern (empty __exit function + module_exit()) is +/- common in the kernel. How about making a macro from it, just like it's done with e.g. module_platform_driver() etc.? So that you could just add to phylink.c something like: module_exit_stub(phylink); > > MODULE_LICENSE("GPL v2"); > MODULE_DESCRIPTION("phylink models the MAC to optional PHY connection"); Thanks, Olek