From 1e0c8d50663ae2afd2307d617fd94a53f6a1dc02 Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Fri, 12 Jun 2026 15:57:31 +0300 Subject: [PATCH] phy: lynx-10g: fix lynx_10g_pccr_val_enabled() The intention of the code is to extract the PCCR8_SGMIIa_CFG field out of the "pccr" value, not to create a new value with the PCCR8_SGMIIa_CFG field set to the "pccr" value. Since FIELD_GET() is implemented as ((reg) & (mask)) >> __bf_shf(mask) and FIELD_PREP() as (val) << __bf_shf(mask)) & (mask) and since "mask" is GENMASK(2, 0), in practice there is no functional difference between FIELD_GET() and FIELD_PREP(). But FIELD_GET() is logically the correct helper. Signed-off-by: Vladimir Oltean Link: https://patch.msgid.link/20260612125731.133330-1-vladimir.oltean@nxp.com Signed-off-by: Vinod Koul --- drivers/phy/freescale/phy-fsl-lynx-10g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/freescale/phy-fsl-lynx-10g.c b/drivers/phy/freescale/phy-fsl-lynx-10g.c index 38def160ef1a..1362d1ebb3d4 100644 --- a/drivers/phy/freescale/phy-fsl-lynx-10g.c +++ b/drivers/phy/freescale/phy-fsl-lynx-10g.c @@ -386,7 +386,7 @@ static void lynx_10g_backup_pccr_val(struct lynx_lane *lane) */ static bool lynx_10g_pccr_val_enabled(u32 pccr) { - return FIELD_PREP(PCCR8_SGMIIa_CFG, pccr) != 0; + return FIELD_GET(PCCR8_SGMIIa_CFG, pccr) != 0; } static bool lynx_10g_lane_is_3_125g(struct lynx_lane *lane)