> -----Original Message-----
> From: Yury Norov <[email protected]>
> Sent: Monday, September 7, 2026 11:55 PM
> To: Andrew Lunn <[email protected]>; Heiner Kallweit
> <[email protected]>; Russell King <[email protected]>; Raju
> Rangoju <[email protected]>; Prashanth Kumar K R
> <[email protected]>; Nguyen, Anthony L
> <[email protected]>; Kitszel, Przemyslaw
> <[email protected]>; Jian Shen <[email protected]>;
> Jijie Shao <[email protected]>; David S. Miller
> <[email protected]>; Eric Dumazet <[email protected]>; Jakub
> Kicinski <[email protected]>; Paolo Abeni <[email protected]>; linux-
> [email protected]; [email protected]; intel-wired-
> [email protected]; [email protected]
> Cc: Yury Norov <[email protected]>; Yury Norov <[email protected]>;
> Rasmus Villemoes <[email protected]>; Andrew Morton
> <[email protected]>
> Subject: [PATCH 5/9] net: phy: use linkmode_and() return value in
> genphy_c45_eee_is_active()
> 
> Use the return value of linkmode_and() to detect an empty set of
> common EEE modes and get rid of a separate linkmode_empty() call.
> 
> Signed-off-by: Yury Norov <[email protected]>
> ---
>  drivers/net/phy/phy-c45.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
> index 870920311f9a..27da1b9ddbc5 100644
> --- a/drivers/net/phy/phy-c45.c
> +++ b/drivers/net/phy/phy-c45.c
> @@ -1623,8 +1623,7 @@ int genphy_c45_eee_is_active(struct phy_device
> *phydev, unsigned long *lp)
>       if (lp)
>               linkmode_copy(lp, tmp_lp);
> 
> -     linkmode_and(common, phydev->advertising_eee, tmp_lp);
> -     if (linkmode_empty(common))
> +     if (!linkmode_and(common, phydev->advertising_eee, tmp_lp))
>               return 0;
> 
>       return phy_check_valid(phydev->speed, phydev->duplex, common);
> --
> 2.53.0

Reviewed-by: Aleksandr Loktionov <[email protected]>

Reply via email to