linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select()
@ 2023-04-03  9:45 Siddharth Vadapalli
  2023-04-03 10:48 ` Roger Quadros
  2023-04-12 16:37 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Siddharth Vadapalli @ 2023-04-03  9:45 UTC (permalink / raw)
  To: vkoul, kishon, rogerq
  Cc: linux-phy, linux-kernel, linux-arm-kernel, srk, t-patil,
	s-vadapalli

In the wiz_mode_select() function, the configuration performed for
PHY_TYPE_USXGMII is unreachable. Fix it.

Fixes: b64a85fb8f53 ("phy: ti: phy-j721e-wiz.c: Add usxgmii support in wiz driver")
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---
 drivers/phy/ti/phy-j721e-wiz.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
index 1b83c98a78f0..1b5f1a5e2b3b 100644
--- a/drivers/phy/ti/phy-j721e-wiz.c
+++ b/drivers/phy/ti/phy-j721e-wiz.c
@@ -443,18 +443,17 @@ static int wiz_mode_select(struct wiz *wiz)
 	int i;
 
 	for (i = 0; i < num_lanes; i++) {
-		if (wiz->lane_phy_type[i] == PHY_TYPE_DP)
+		if (wiz->lane_phy_type[i] == PHY_TYPE_DP) {
 			mode = LANE_MODE_GEN1;
-		else if (wiz->lane_phy_type[i] == PHY_TYPE_QSGMII)
+		} else if (wiz->lane_phy_type[i] == PHY_TYPE_QSGMII) {
 			mode = LANE_MODE_GEN2;
-		else
-			continue;
-
-		if (wiz->lane_phy_type[i] == PHY_TYPE_USXGMII) {
+		} else if (wiz->lane_phy_type[i] == PHY_TYPE_USXGMII) {
 			ret = regmap_field_write(wiz->p0_mac_src_sel[i], 0x3);
 			ret = regmap_field_write(wiz->p0_rxfclk_sel[i], 0x3);
 			ret = regmap_field_write(wiz->p0_refclk_sel[i], 0x3);
 			mode = LANE_MODE_GEN1;
+		} else {
+			continue;
 		}
 
 		ret = regmap_field_write(wiz->p_standard_mode[i], mode);
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select()
  2023-04-03  9:45 [PATCH] phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select() Siddharth Vadapalli
@ 2023-04-03 10:48 ` Roger Quadros
  2023-04-12 16:37 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Roger Quadros @ 2023-04-03 10:48 UTC (permalink / raw)
  To: Siddharth Vadapalli, vkoul, kishon
  Cc: linux-phy, linux-kernel, linux-arm-kernel, srk, t-patil



On 03/04/2023 12:45, Siddharth Vadapalli wrote:
> In the wiz_mode_select() function, the configuration performed for
> PHY_TYPE_USXGMII is unreachable. Fix it.
> 
> Fixes: b64a85fb8f53 ("phy: ti: phy-j721e-wiz.c: Add usxgmii support in wiz driver")
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>

Reviewed-by: Roger Quadros <rogerq@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select()
  2023-04-03  9:45 [PATCH] phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select() Siddharth Vadapalli
  2023-04-03 10:48 ` Roger Quadros
@ 2023-04-12 16:37 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2023-04-12 16:37 UTC (permalink / raw)
  To: Siddharth Vadapalli
  Cc: kishon, rogerq, linux-phy, linux-kernel, linux-arm-kernel, srk,
	t-patil

On 03-04-23, 15:15, Siddharth Vadapalli wrote:
> In the wiz_mode_select() function, the configuration performed for
> PHY_TYPE_USXGMII is unreachable. Fix it.

Applied, thanks

-- 
~Vinod

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-12 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-03  9:45 [PATCH] phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select() Siddharth Vadapalli
2023-04-03 10:48 ` Roger Quadros
2023-04-12 16:37 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).