From patchwork Thu Nov 16 11:09:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 165765 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp3134544vqg; Thu, 16 Nov 2023 03:10:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+ph+vSdsScvQdChsRlL8+AhV68XDAymxrARplOnzgTsJy24LlFy4jV3Xd4Y3bQ9FCp0lp X-Received: by 2002:a17:90a:1918:b0:280:3f33:64d8 with SMTP id 24-20020a17090a191800b002803f3364d8mr18073716pjg.21.1700133008178; Thu, 16 Nov 2023 03:10:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700133008; cv=none; d=google.com; s=arc-20160816; b=gWcz85NkkonKuHPgr3lX9JvEBW8J1WfHvrsBycZJQZjYASVEpC838upr5alkSi1P1G IbVib31DO8KmOlXavgi3+1+9uogjg/ExSgo7Tu5HX6y3tMkn7U3aN2TjY24KSqxuq6AO XduWOYlB7y5ELPRETp/nfLrb9X9S/G3ruwwmmly3DvkaNtf2IV2Gin4hInYFD6PFEtcT R0+x2GidlC2g0SCbLpezSboIaefcZqW6KNcN5CC5KjKU7BTK4WpymQVqTBjvREmnATEb a/lvb5pJVWyZj4FWZUpZLXcc4cY/sJeRZyUjfSRrT9cSNLLdpdZayOe5648N1Vn8VylN fkFQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=O0PO8md6w/TmCM4ZEYrpCR9Jxbf/7cFiaIL5SN2Bzb8=; fh=+b5yjKBwyfaviWrudq93LJLyZoJ9pLG900jCpl1b2NU=; b=i7v9Wz3jXYR443axpA5TE0fR0qddeaOs1aX0249lBxnzGI9vG8PQAkO7VVWNHxAuS4 /jHKKOIgY6A18UdDGVtSJZkGEXma/TAPle4fZg0EAAGz+frPMLkpV8yrk1N6l3t5Lxrz A9kIMS1xDluH2PSqTIfS56EPfVwX51CpnPByKrmGMYeHNf6FDs7wpT5KQXZvxTbp4H/o mjRUzAjNZHgy/PPBHal7tg02kiovrPD0OlIv/lR+j69HncyEhotA1Vdhuv6egaqFoGV0 l3ULPp0XQ5I4T5Tq71SCI5gbwbaIHD53H1ArnDsardeHABkUaLG+drXyD/8WF0ItmIPU mEvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I9wTzMrq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id mq16-20020a17090b381000b0028098007c8csi1889783pjb.84.2023.11.16.03.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 03:10:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I9wTzMrq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1237F81CEB07; Thu, 16 Nov 2023 03:10:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345085AbjKPLJw (ORCPT + 29 others); Thu, 16 Nov 2023 06:09:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345078AbjKPLJs (ORCPT ); Thu, 16 Nov 2023 06:09:48 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81727187; Thu, 16 Nov 2023 03:09:43 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A14DC433C8; Thu, 16 Nov 2023 11:09:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700132983; bh=YLOPG/dfau4Y6nKS1EnNrpTxtMUZK5zJEUgptsdiajY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I9wTzMrqJhMqM+fxK6gMrs7lkzOVG5DVhq+4nI6SQ2Znaw5iIzJfsEntvyprofL7O 6F81ebZVs0xifRuWxUuh3EqqajNulv8u6bND0xFoNH2vP3VmDDMtHiOaPVsYUReCZc 3cEpAtAd86/tBozdwxUKYoucWHXUxF5uS5gTKsxo9FpBTLhSB4Qf0eQK93nj3LATzO 8sMt5MUihEHysXhXcm22k479GrB1rLu5C0MGJnua1DxujuMJPOr/lTu78HaM5DdA3q 7dSXJvUmTagSjQlLpLLI4wYvVks3NaxZvUWWnuT2trVS9TrMWi7yINrx49H2w8Bo7u zig2Tn3+/cP/Q== From: Roger Quadros To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: vladimir.oltean@nxp.com, s-vadapalli@ti.com, r-gunasekaran@ti.com, vigneshr@ti.com, srk@ti.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros , stable@vger.kernel.org Subject: [PATCH net 1/2] net: ti: am65-cpsw-nuss: Fix devlink warning on module removal Date: Thu, 16 Nov 2023 13:09:29 +0200 Message-Id: <20231116110930.36244-2-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231116110930.36244-1-rogerq@kernel.org> References: <20231116110930.36244-1-rogerq@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 16 Nov 2023 03:10:07 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782718669266467103 X-GMAIL-MSGID: 1782718669266467103 devlink_port_unregister() should be called after unregister_netdev() so that the devlink_port->type is set to DEVLINK_PORT_TYPE_NOTSET and avoids the below warning. [ 48.511030] WARNING: CPU: 2 PID: 683 at net/devlink/port.c:1077 devl_port_unregister+0x80/0xa8 CC: stable@vger.kernel.org # v6.6+ Fixes: 58356eb31d60 ("net: ti: am65-cpsw-nuss: Add devlink support") Signed-off-by: Roger Quadros --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index ece9f8df98ae..cbbede094b2c 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -3011,13 +3011,13 @@ static int am65_cpsw_nuss_remove(struct platform_device *pdev) if (ret < 0) return ret; - am65_cpsw_unregister_devlink(common); am65_cpsw_unregister_notifiers(common); /* must unregister ndevs here because DD release_driver routine calls * dma_deconfigure(dev) before devres_release_all(dev) */ am65_cpsw_nuss_cleanup_ndev(common); + am65_cpsw_unregister_devlink(common); am65_cpsw_nuss_phylink_cleanup(common); am65_cpts_release(common->cpts); am65_cpsw_disable_serdes_phy(common);