From patchwork Wed Mar 22 12:00:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King \(Oracle\)" X-Patchwork-Id: 666234 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 E76D1C6FD1F for ; Wed, 22 Mar 2023 12:00:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230297AbjCVMAa (ORCPT ); Wed, 22 Mar 2023 08:00:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230357AbjCVMAV (ORCPT ); Wed, 22 Mar 2023 08:00:21 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E17A58C08; Wed, 22 Mar 2023 05:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=8nTXt9jwCRvOhTsm0b98Gb8SczR5k6rwx9F+YdbECbg=; b=It1DEF6JvIsPSYpkNMbiq/hfH3 g/C6n2PDShXjrOiRdjUXqU3nAv1ZLuOMlnl39hRvyD4fW2FVgtxXBuW8pZdULpn1UXyYZbWEFLBWo 3P0WS183DyR1NcrHOozpc+ECG3IyLnXwylzjICxSdKlohqr75LXXKUsFnU/+0AYswl7QnFsGpY5ag Kak9lqzTfS2lWfAr5Cnd1nSSxxrNn8kmvjspshizwSLYl79C095IlnE7Ic1MbKB+cuHvw78XBkOAk Wm2xdt7cmTRg7D4hYAfZxTHVpP7M8pl0LGJXJTfK09KIEMaMW7Rar8ZYJF1dWii+q87h94wN62xFC mpIzYeqw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:45528 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pex8b-00036M-6A; Wed, 22 Mar 2023 12:00:17 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pex8a-00Dvo3-G7; Wed, 22 Mar 2023 12:00:16 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Andy Shevchenko , Daniel Scally , "David S. Miller" , Eric Dumazet , Florian Fainelli , Greg Kroah-Hartman , Heikki Krogerus , Jakub Kicinski , linux-acpi@vger.kernel.org, netdev@vger.kernel.org, Paolo Abeni , "Rafael J. Wysocki" , Sakari Ailus , Vladimir Oltean Subject: [PATCH RFC net-next 5/7] net: dsa: avoid DT validation for drivers which provide default config MIME-Version: 1.0 Content-Disposition: inline Message-Id: Sender: Russell King Date: Wed, 22 Mar 2023 12:00:16 +0000 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org When a DSA driver (e.g. mv88e6xxx) provides a default configuration, avoid validating the DT description as missing elements will be provided by the DSA driver. Signed-off-by: Russell King (Oracle) --- net/dsa/port.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/dsa/port.c b/net/dsa/port.c index c30e3a7d2145..23d9970c02d3 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -1951,6 +1951,9 @@ static void dsa_shared_port_validate_of(struct dsa_port *dp, *missing_phy_mode = false; *missing_link_description = false; + if (dp->ds->ops->port_get_fwnode) + return; + if (of_get_phy_mode(dn, &mode)) { *missing_phy_mode = true; dev_err(ds->dev,