All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [net-next PATCH 1/3] net: phy: introduce phy_id_compare_model() PHY ID helper
Date: Thu, 11 Sep 2025 14:00:32 +0100	[thread overview]
Message-ID: <20250911130032.GL30363@horms.kernel.org> (raw)
In-Reply-To: <20250909202818.26479-1-ansuelsmth@gmail.com>

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@gmail.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
> 
> 

      parent reply	other threads:[~2025-09-11 13:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-09 20:28 [net-next PATCH 1/3] net: phy: introduce phy_id_compare_model() PHY ID helper Christian Marangi
2025-09-09 20:28 ` [net-next PATCH 2/3] net: phy: broadcom: Convert to phy_id_compare_model() Christian Marangi
2025-09-09 21:30   ` Andrew Lunn
2025-09-09 21:35   ` Florian Fainelli
2025-09-09 20:28 ` [net-next PATCH 3/3] net: phy: broadcom: Convert to PHY_ID_MATCH_MODEL macro Christian Marangi
2025-09-09 21:31   ` Andrew Lunn
2025-09-09 21:36   ` Florian Fainelli
2025-09-09 21:27 ` [net-next PATCH 1/3] net: phy: introduce phy_id_compare_model() PHY ID helper Andrew Lunn
2025-09-09 21:35 ` Florian Fainelli
2025-09-11 13:00 ` Simon Horman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250911130032.GL30363@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.