Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2680296rdb; Mon, 5 Feb 2024 14:18:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVRa2nNcaxgSliRj5ekgEDw48ArYP5S29dckHLj9fy3nAGfQjepTKDGwRgVKplwqwz/m/Z X-Received: by 2002:a05:6871:148:b0:219:27ff:ca86 with SMTP id z8-20020a056871014800b0021927ffca86mr1188967oab.40.1707171533566; Mon, 05 Feb 2024 14:18:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707171533; cv=pass; d=google.com; s=arc-20160816; b=j20HXCNND6F7BPJmp0AAKE9IPWW8KXCY932XWOnMp4781LfxUyI2u2J2g5ARBMnPl7 JKeol1gnRt3pFOrbmIBQZrcqpcg/k5UfRkubjBp8w9LWEAo6jaw6GfteOq+eCS7ZVUlO YVD6n1nto3+JI7NV011jKMqA4iyNVcfd66DQYCJbhXCkQaQgMPetzD1CnCN+l/0+gtb4 7iyyTKV8h3KeCKC4gFMRSBv0QBReUPhLsswhzrtws3VVYANMiuULnWC6KoMlTMKTWQLn gP1/7T51Mx//EZE2VtLTLAjpQdRmCHch07cEUiqgTchkfHj5UPXEWmlY9qUlIYp6KbfP 8aJw== 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=gw7uoQGHEqKWZF9QX57qSGw0NIN4a0TmmuavY8LclmI=; b=sZtTIS8kz6lH6HVBAR7EqF5xfA5ofWTlgIiosFnkfIDGNhTWpyzHVwbw+SfVZ6hJmD 3Av5IWYPCLqF6viCPV4I4+5KZIM8ZLtqX5L9pU+SbUxhtN5wNK5m4F0ZiakgA9Eu9DRA jkcUPY0wIcgx30Pq0ktqsXWamryrKt8z0nq2exbUde9rH2nSdPkS2R44iywdLH9gq68H 2GW5ll5yerVimheS6WbvpW9f4ZCnMa7X0PjmXOFGo6o+bls+uoDIn4KXxK+L2WIawdLZ jxHfO1+bQXVgZx0PdSIHKTiirKmUK7JjOPvaouhNdliwMdrNDMTa+4VvVWPLCQonfUpU MuIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QZET9z3z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-54002-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54002-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; AJvYcCU0CNmdocaq7zivnIhi2Vihq8rXdsIwvwpwEs9rv7vcM28lJHlG5tKo9AIkWw+al3Xil3eZu6fFfPAqah20D4wZOPxEAG0EjgOaJdkhAQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q19-20020a05622a04d300b0042c0b2477e8si892771qtx.441.2024.02.05.14.18.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 14:18:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54002-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QZET9z3z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-54002-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54002-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 536F71C2788E for ; Mon, 5 Feb 2024 22:18:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C00350241; Mon, 5 Feb 2024 22:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QZET9z3z" 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 9C28B4F60C; Mon, 5 Feb 2024 22:08:14 +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=1707170894; cv=none; b=DX0aIAwvWt4QUrxG1miGz/hYdNZw8gNA5rhy/a8ZhcItePnHReSpqeUPA5PvL0n5xZvYixNKbVoMDxFk0yAZxTidxKmUFwYgbXKtmc3lqpAPYkW/jWUlOX0TL0ZgdQeo8257YRAL3n4DG6WoZz+hdo59SQFDqk0+Fpj9umRkJ88= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707170894; c=relaxed/simple; bh=8EgBgwLLDbF/8jK7XPHzV7GGgAjVhqj4SpRaslo5nG4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ax5/o5Ex1FkdwmibV2Y2oFeQKU5k4kzeHbtEbC/ohLrzaq6tzmX0nVnCYCVwzhtk3f4dwlKRPz+y0KtJMMMQyVed1xiAddum705ar5e6iGf0zIHOuntrBUSB9VJ5nIihPq3faKLBUnvRmV40U4VqQCKMDdCt0ONG7+w8RirpMzc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QZET9z3z; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 449A8C433C7; Mon, 5 Feb 2024 22:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707170894; bh=8EgBgwLLDbF/8jK7XPHzV7GGgAjVhqj4SpRaslo5nG4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=QZET9z3zeedOcUFANG1j5xtmknEO9qufzKyFJM3PWulLWLocFZjKndR/AOWoQoCa5 3V/MsB7BrI7qusCBlXECDyfv5ljB7aB7fakS9PqZne1P/DkaOsbin8jN1CnwYTR1NZ vvG4guoHprTITFmhSe1vZBpMiw1ccTeVkSuRF9NGGAanx5+Hzz8D7h+skZYG3FNq6V gGqMQs+0SA5mMTM/qU0RpjS/ASQhNSXY+/Bdqy49J3b+Lvb74vYTdBwKaIglnclKMQ ghykALF2m5LRIm5y1Le3b0CHNGCSBMhG1l4XQVOzZ5CUCN/sN9olX4umSM867eTDH6 6Nu9jxit9sSaw== 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 26F6EC4828D; Mon, 5 Feb 2024 22:08:14 +0000 (UTC) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= via B4 Relay Date: Tue, 06 Feb 2024 01:08:02 +0300 Subject: [PATCH net-next v5 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: <20240206-for-netnext-mt7530-improvements-2-v5-1-d7d92a185cb1@arinc9.com> References: <20240206-for-netnext-mt7530-improvements-2-v5-0-d7d92a185cb1@arinc9.com> In-Reply-To: <20240206-for-netnext-mt7530-improvements-2-v5-0-d7d92a185cb1@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=1707170890; l=1626; i=arinc.unal@arinc9.com; s=arinc9-patatt; h=from:subject:message-id; bh=w0AE+3vdRdnNAeZ4Rw1iuOmXQ/hQFv6Ji5v3rRgN9bg=; b=gDGcthfD6OjI984VKp0zlbDTxdggWBt3tmhCllIbyTIAMYWMBBgmWODnybQRLAOeQoF87Tjov 8H7Qck/hmaYC/HRYET2p2f2Ns05cxQoJMPLHHQdK/glbZ1j2xpm45Qs 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