[PATCH v2 net-next 06/14] net: enetc: simplify enetc4_set_port_speed()

Maxime Chevallier maxime.chevallier at bootlin.com
Thu Jul 2 10:32:36 PDT 2026



On 7/2/26 04:57, wei.fang at oss.nxp.com wrote:
> From: Wei Fang <wei.fang at nxp.com>
> 
> Since phylink only passes valid speed values to mac_link_up, the switch
> statement with its default fallback to SPEED_10 is unnecessary. Replace
> it with a direct call to PCR_PSPEED_VAL(). Also update PCR_PSPEED_VAL()
> to use FIELD_PREP() for proper field masking instead of an open-coded
> shift.
> 
> Signed-off-by: Wei Fang <wei.fang at nxp.com>

Reviewed-by: Maxime Chevallier <maxime.chevallier at bootlin.com>

Maxime




More information about the linux-arm-kernel mailing list