[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250911130032.GL30363@horms.kernel.org>
Date: Thu, 11 Sep 2025 14:00:32 +0100
From: Simon Horman <horms@...nel.org>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [net-next PATCH 1/3] net: phy: introduce phy_id_compare_model()
PHY ID helper
On Tue, Sep 09, 2025 at 10:28:10PM +0200, Christian Marangi wrote:
> Similar to phy_id_compare_vendor(), introduce the equivalent
> phy_id_compare_model() helper for the generic PHY ID Model mask.
>
> Signed-off-by: Christian Marangi <ansuelsmth@...il.com>
> ---
> include/linux/phy.h | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 04553419adc3..6adf7c5a91c2 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -1308,6 +1308,19 @@ static inline bool phy_id_compare_vendor(u32 id, u32 vendor_mask)
> return phy_id_compare(id, vendor_mask, PHY_ID_MATCH_VENDOR_MASK);
> }
>
> +/**
> + * phy_id_compare_model - compare @id with @model mask
> + * @id: PHY ID
> + * @vendor_mask: PHY Model mask
@model_mask
> + *
> + * Return: true if the bits from @id match @model using the
> + * generic PHY Model mask.
> + */
> +static inline bool phy_id_compare_model(u32 id, u32 model_mask)
> +{
> + return phy_id_compare(id, model_mask, PHY_ID_MATCH_MODEL_MASK);
> +}
> +
> /**
> * phydev_id_compare - compare @id with the PHY's Clause 22 ID
> * @phydev: the PHY device
> --
> 2.51.0
>
>
Powered by blists - more mailing lists