Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1961858rdb; Sun, 4 Feb 2024 08:35:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHonM4Y5feuTGtyTWe+T10qAfOo8bvqu7Dnkojj8rI+eDvT1eTb3PBxhmzePwYXMbfpvzmb X-Received: by 2002:a17:902:f551:b0:1d9:95c5:296e with SMTP id h17-20020a170902f55100b001d995c5296emr3181683plf.53.1707064526337; Sun, 04 Feb 2024 08:35:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707064526; cv=pass; d=google.com; s=arc-20160816; b=TyNG5XUMMB/4x+nCqkSr8KYi7pkkioLh7KXdJXyCME/GhH1JeDENpVAX+AVFoVPWMu BU8QIwzLplIGIs2kIqjYACATPZMd0DRm8XCat2KBe9BjHQT+OwEPlArIOoo8lI1HOaP+ aQYeomIPIT9UJLWyo8qLUp+7VzMEKIzMqwV4JBLJgJtaN7Kp/k7IvU/DUP/q6YmsnBlN o3P8ajM5k/fBvcpkkr1NFjjzPKFUUmYaAV2otqIX1p6cGacxQxH/bGrQFlrqj0KgpFKA OT/WZovX3obbx0JyoLyX1q/xnuOo1uW3ilnx0rJcPSwf3xVFUg+TtK5jMMCLZgdG+KCX boug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=OBGtxL2wM3ggkKMqyYZK4e4tJmIwHxrWlzdaLwanaV4=; fh=DS6zxUJUKqDD1yb4BbMpXBQeiVhsGqcstpSIu2zs860=; b=mFdJjNwqeCsV7lRabbb6q6J3DHMe6rHBb1zpszEuU0JJ0DTnx+JWRA/ngNW0lVnx/H 0YGxqzZIWNHBmuOun5ES7O0gs8tXIYnLFMaWIk77f0NU4CUgO1xmSpj89pYTB0CwofYl Q9S61FkDoPbTFj8NauETBwPAgal21/XAJtR2E/oXVEQGDVtcMXtRrWmCj57z4ExC0Sc8 oToNDGxycyN9uw5XUh2TsMDlwBKcGM6e/RFPJpH9+8cK+OKe+U2OMDyjN1MO3rEcnClB vMvIRXV7nlyMvgL1BlnrJ7OivvYUWVx0kg822/VQ0BhH8uqkNuEXpWmkxyWzQY3DlLxk T99Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PJ8saHCS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51791-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51791-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCW6lOlB8twa0vfoYp+VLUWu8JJWf0nrkpjRDTU23fyj49u1kEX476fJHzLDqjKdi78+K6T0Fpx2DWuwsNqorA7J+rwZ0XdtLeas6J7hJQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t8-20020a170902b20800b001d8dd20eb90si4864302plr.120.2024.02.04.08.35.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 08:35:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51791-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PJ8saHCS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51791-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51791-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F06D4283C6A for ; Sun, 4 Feb 2024 16:35:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24F4B24B28; Sun, 4 Feb 2024 16:34:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PJ8saHCS" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3068922EF4; Sun, 4 Feb 2024 16:34:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707064492; cv=none; b=F9JQYpHe9eeqyCou4lgrsciqaov4VQg2xg5Gzs3HRTEWkH35FtKeP/QWGOCa35e+iCDNtcmzjBSbn/ikdDa/aVh6SzNjOdg/Sm4PfGpO607UiZwtJmqpR59k/NJeucupg2PsbgAhtxHWhVkbr1K4jzHlBnRZHYdwVdW4XNsG+3w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707064492; c=relaxed/simple; bh=8EgBgwLLDbF/8jK7XPHzV7GGgAjVhqj4SpRaslo5nG4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fckZTW4iaqjUuyLb1Wcgtcf6CDoCvdkYVDLdVuwpNDtDyxuLHhh0N57XgSvtlgEqhL0qniVm1oXpJyjusIpG++TxBTS7usjGB34CbqTFoyd4FYi1lVBkVJl/e3jAitHK7PeTGRq4OD0376QMizBVWoaMCPJR75N7rxJx6g8ozFM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PJ8saHCS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id BC121C433F1; Sun, 4 Feb 2024 16:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707064491; bh=8EgBgwLLDbF/8jK7XPHzV7GGgAjVhqj4SpRaslo5nG4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=PJ8saHCSzO+6RL4kpGkALu4B0h1MAqYUvOcdEdB+VR//k3d9tHdktY5ImOpCG5zIO 6NPZYrXAO0/Vzp47646+KtLFEx/6jCf8sj24wSDdr6m5nomwLcfKh9S0ktZf0TV3Ng rSA7N1shLXA74WmIATnnm/4Lbbu08iE6AdEeqni7F+fbZngdjF5ZL6IoYxVGr83Eor ld39qyXOx3QphzMWbaHJhXeKU8FjGorqETv/JRgLU5lxqYu9NOApQWRaw+zy/i85qy Rk3CDa2gqvXSzQhNP6n56eurXuuorSxZca7hlJ579mob8+yTjOIABWR8Nep7yZO+HF 6tNA7zNRAUp4g== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BCD4C48295; Sun, 4 Feb 2024 16:34:51 +0000 (UTC) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= via B4 Relay Date: Sun, 04 Feb 2024 19:34:19 +0300 Subject: [PATCH net-next v4 1/7] net: dsa: mt7530: empty default case on mt7530_setup_port5() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240204-for-netnext-mt7530-improvements-2-v4-1-02bf0abaadb8@arinc9.com> References: <20240204-for-netnext-mt7530-improvements-2-v4-0-02bf0abaadb8@arinc9.com> In-Reply-To: <20240204-for-netnext-mt7530-improvements-2-v4-0-02bf0abaadb8@arinc9.com> To: Daniel Golle , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King Cc: mithat.guner@xeront.com, erkin.bozoglu@xeront.com, Bartel Eerdekens , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, =?utf-8?q?Ar=C4=B1n=C3=A7_=C3=9CNAL?= , "Russell King (Oracle)" X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707064489; l=1626; i=arinc.unal@arinc9.com; s=arinc9-patatt; h=from:subject:message-id; bh=w0AE+3vdRdnNAeZ4Rw1iuOmXQ/hQFv6Ji5v3rRgN9bg=; b=s3Kw4c5/nutxv/vHbPVprWQPAVNL6qyc2M6KawDnizC4AIh+M9yZkWbxv7unh7nrk7qgOI8aq YVNF9mgt7RVAwQqUJ0YC1HeE2t/3k8rXtvW0cKGWy6fy/WbMA8W8Xc4 X-Developer-Key: i=arinc.unal@arinc9.com; a=ed25519; pk=VmvgMWwm73yVIrlyJYvGtnXkQJy9CvbaeEqPQO9Z4kA= X-Endpoint-Received: by B4 Relay for arinc.unal@arinc9.com/arinc9-patatt with auth_id=115 X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= Reply-To: From: Arınç ÜNAL There're two code paths for setting up port 5: mt7530_setup() -> mt7530_setup_port5() mt753x_phylink_mac_config() -> mt753x_mac_config() -> mt7530_mac_config() -> mt7530_setup_port5() On the first code path, priv->p5_intf_sel is either set to P5_INTF_SEL_PHY_P0 or P5_INTF_SEL_PHY_P4 when mt7530_setup_port5() is run. On the second code path, priv->p5_intf_sel is set to P5_INTF_SEL_GMAC5 when mt7530_setup_port5() is run. Empty the default case which will never run but is needed nonetheless to handle all the remaining enumeration values. Reviewed-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Signed-off-by: Arınç ÜNAL --- drivers/net/dsa/mt7530.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 68be38ae66e0..330e22abc076 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -943,9 +943,7 @@ static void mt7530_setup_port5(struct dsa_switch *ds, phy_interface_t interface) val &= ~MHWTRAP_P5_DIS; break; default: - dev_err(ds->dev, "Unsupported p5_intf_sel %d\n", - priv->p5_intf_sel); - goto unlock_exit; + break; } /* Setup RGMII settings */ @@ -975,7 +973,6 @@ static void mt7530_setup_port5(struct dsa_switch *ds, phy_interface_t interface) dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, intf_sel=%s, phy-mode=%s\n", val, p5_intf_modes(priv->p5_intf_sel), phy_modes(interface)); -unlock_exit: mutex_unlock(&priv->reg_mutex); } -- 2.40.1