Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2798446rdd; Sat, 13 Jan 2024 02:26:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IE984NwCYDYmb5w6xjpXp+eO97TlleuIEwDYpJCaaH9bcJYhNWxhmzVizmLSNGq79oVTz3I X-Received: by 2002:a05:6870:9344:b0:206:c593:3111 with SMTP id j4-20020a056870934400b00206c5933111mr2472147oak.104.1705141595974; Sat, 13 Jan 2024 02:26:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705141595; cv=none; d=google.com; s=arc-20160816; b=D+YEsOHqWTdsSco6e4UI8jQ5aua77fs/nqohYX0jZ3H8NSQc8sLvkV+IwsLR4S1WgE O8PckIzEOWCI47KELq2teqNCFLNlwPSzJ/cJjGk55ZbEgEWIaJ0AVOhS0NDnpt8y7ifH CTCYxKjdfNazbLv8Cnv61NN+op3daaxLWiL8Y9R7dRh//GvJJqNL0MKGSJ9AYM0M0SYy R9hZKNekCvpR0B5/26hAjM46CgpJ+T5ngcjNvnasKqNLazfTVpJYYLHxdjOudDdQ5pUc a4Kt0GThvnfnc5tAsalkQ3NJuhQKzqz0McSfDA9D/0Qsk0ZqgbgFBN9eMkCIz0LJ3JKB J0mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0TP3w9JbDAsI5EAwU/g81SPCH2SLDYBTUzxHGcp67aQ=; fh=oEE+jV5O4HAXE+nw8ulhLME5zcU0kdlsqoguEBeScfM=; b=ZDyD4AgHKN9AUtm96Pof8GxnHW4OG0M4wAMvNDkpNGjZwGFN7l+OvgFj9y0bXUyvaF cdbv7Wy23O79TgMy9wt4oxsLU+HP2zDLaKxs9ABRWMOQreEzgerNcUXl2XgCwE+kciCB rHvBLsz5/SPCDMfnA/PXtki7cao3Y0TSDRZv+Qy4iMWUjrDcQo/oDDL1+u+Xu/fViFar hIZjjtZqDKxK+MW/5FF+b0nwgUyXWytHtB6oanysNHT3PCg0Pu71uo2TQJ3ycMBPqe7l uHZOhEI+ncS2xTSUx79SzK/9wZPyPzobZLAwO9yHrb95kaTm6MMvpXMIgD9YyS8K/nst iHLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b="Mg/sw8+v"; spf=pass (google.com: domain of linux-kernel+bounces-25253-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u17-20020a656711000000b005cf268638f4si5036452pgf.156.2024.01.13.02.26.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 02:26:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25253-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=@arinc9.com header.s=gm1 header.b="Mg/sw8+v"; spf=pass (google.com: domain of linux-kernel+bounces-25253-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com 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 8DBF42853E7 for ; Sat, 13 Jan 2024 10:26:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CB751A70B; Sat, 13 Jan 2024 10:26:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b="Mg/sw8+v" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (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 E574A17C6F; Sat, 13 Jan 2024 10:25:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arinc9.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 3779760003; Sat, 13 Jan 2024 10:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1705141550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0TP3w9JbDAsI5EAwU/g81SPCH2SLDYBTUzxHGcp67aQ=; b=Mg/sw8+vYeibN3qlAutaIlsH5JgiRs479THW1QsVcDXpsqIsHfInIeBXZu5ISLOyrYrVpG HaajgWRekgxQkOg9Gmw9CE4JITAH9f4NwkmsMapEC6/4J6Pzts5lYLe2yhNoOECS8Ngd8q cb9hyli0WyWwot8dir5RAblb4UW2WGf2PAqL2rQoN+2mXEtGuwCxOqd26hituLwfy+dQLr gbmLBL6NKZVOshrwzbRRDBwyJy3bf1sJmMXCjcW9iwTO6KIBu7IQRI0W00XGaQBAStO9oK RgapGfp1kszAvQIRUWPc9fAcpxMKGbeGeNKe0/E6e2Qb53t3XxJ04hTmEm+oaw== From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= To: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno Cc: mithat.guner@xeront.com, erkin.bozoglu@xeront.com, Luiz Angelo Daros de Luca , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [RFC PATCH net-next 1/8] net: dsa: mt7530: empty default case on mt7530_setup_port5() Date: Sat, 13 Jan 2024 13:25:22 +0300 Message-Id: <20240113102529.80371-2-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240113102529.80371-1-arinc.unal@arinc9.com> References: <20240113102529.80371-1-arinc.unal@arinc9.com> 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 X-GND-Sasl: arinc.unal@arinc9.com 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. Signed-off-by: Arınç ÜNAL Reviewed-by: Vladimir Oltean --- 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 7f9d63b61168..88ab926ce19e 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