Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2922680rdh; Mon, 27 Nov 2023 02:18:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOd3AxlJ2h8iOI9wXzr9GTMc9cMca6k/94cPwap4lXAadgKBzX0sP5ngCtZJ/QkBowE7sf X-Received: by 2002:a17:90b:1bd0:b0:285:ba0a:1c9d with SMTP id oa16-20020a17090b1bd000b00285ba0a1c9dmr4064675pjb.6.1701080320478; Mon, 27 Nov 2023 02:18:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701080320; cv=none; d=google.com; s=arc-20160816; b=ofUb75drbWHVpc3ugz8DHWsj1RAr/M1ZI7J/kHZssLB/IpVw1oLiGhgBJbtsCKaKZK 8VC9DdhnD/v8xFSVZoNUMdkQVsdgHfVvns3iY3p8B5wTpOc8T/iy+XVde8+EnCD4OE3P jm7Hh305Aqkgafm/uNDhmo1Gpef38ywCSIdcVpyd5tDPdVOd+U00uG4Pc+86RlppPQVC E1JtbsdEFXeAJGAtbTuZdun+ld3CL3m1V661BFikscgXujj39D4M6UZBAjp8o/leVsSn LDORLLKpD7qG+Wuoa98HwuacDj65e8nWWkhvLwk5OfD0mXJ0YKwor0Re9MoyoXQDmsbt V+kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=P/NIOe4c65UqVH7B1XbQqgi6ppFLhCRs56TFX2ecn+Y=; fh=gsXiJVceV9jD0Eau8FRubV2mV4Ce0rkrkDszh9lLmC0=; b=Qw6vShiUW7KwLLnbi8ZpPm8MInTr0ktZx83+LdkY7KpPyibzc/3rp8No+NXphWOe9Y oBOhrPPPzaP2/wcC4R1XSiZ59+aa+cq8tMIga2ORFm+ETlNw9+coZNzbGvY1vv3xIWNO Iqt+fxYLccGTxX09TjHrDauf4j3HGV4j92vt5JXQ0pwLNv15CSmPHfxKxIfTIi+qgwyA old5FuzZo3PTzXnvzPZ49Sb9dkuqss7QBCnXcu8ztBW4iUS4LdZiHXt+0S4etH5VdZDU bKCfBmNh6rg9VscgCtqk8DUfL6eXJqnpA89a5UN7yJ4RSeVWTTzHzaL0HhsEZ1siFgi3 5hvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=I1kG75vg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id s5-20020a17090a5d0500b002741e78e66asi9804158pji.153.2023.11.27.02.18.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 02:18:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=I1kG75vg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 1A61B8041EC6; Mon, 27 Nov 2023 02:18:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232894AbjK0KSW (ORCPT + 99 others); Mon, 27 Nov 2023 05:18:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232889AbjK0KSU (ORCPT ); Mon, 27 Nov 2023 05:18:20 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30C90EA; Mon, 27 Nov 2023 02:18:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701080307; x=1732616307; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=EHjb8a4oKENRdIROHVOuLNb1REGASuIrFu/8GnwvA6M=; b=I1kG75vgCflcYYI6RvFpQfTH38L7BxKPxmXkrwQmnaquDw59v+IykMSE YuNHABUUXb0JE3owaK0uKNeyR9k9B7SE2CpG5WJsw2/RFulit+Ai8C2Tz /68udVlruIfa91OvW7iCCGuaueMHA6wsKY0KanqQMhFcrGjaYFjl7rXJT nvSwbluj0e2QsLhMKBycrEXtVzaTB1/9oP8DZXwzsi3ewl3IfUeCgfVB9 ZJYRlon795lF1/VpcR9Z9i4TcBPFhlkWth860YKOf/uyVHBAxskxK/PwU K5Ab72XTX5b2quK/nV5CYILT842dhp7FCkBGlW7a9W8GKCaceU++Hs1bu Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="11372970" X-IronPort-AV: E=Sophos;i="6.04,230,1695711600"; d="scan'208";a="11372970" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 02:18:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="891690067" X-IronPort-AV: E=Sophos;i="6.04,230,1695711600"; d="scan'208";a="891690067" Received: from ssid-ilbpg3-teeminta.png.intel.com (HELO localhost.localdomain) ([10.88.227.74]) by orsmga004.jf.intel.com with ESMTP; 27 Nov 2023 02:18:21 -0800 From: Gan Yi Fang To: Russell King , Andrew Lunn , Heiner Kallweit , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?UTF-8?q?Marek=20Beh=C3=BAn?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Looi Hong Aun , Voon Weifeng , Song Yoong Siang , Gan Yi Fang , Lai Peter Jun Ann Subject: [PATCH net 1/1] net: phylink: Add module_exit() Date: Mon, 27 Nov 2023 18:16:03 +0800 Message-Id: <20231127101603.807593-1-yi.fang.gan@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 pete.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 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 02:18:38 -0800 (PST) From: "Gan, Yi Fang" 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); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("phylink models the MAC to optional PHY connection"); -- 2.34.1