linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: jitendra.vegiraju@broadcom.com
Cc: netdev@vger.kernel.org, alexandre.torgue@foss.st.com,
	joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com,
	bcm-kernel-feedback-list@broadcom.com, richardcochran@gmail.com,
	ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org,
	john.fastabend@gmail.com, linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org,
	andrew@lunn.ch, horms@kernel.org, florian.fainelli@broadcom.com
Subject: Re: [PATCH net-next v3 2/3] net: stmmac: Integrate dwxgmac4 into stmmac hwif handling
Date: Fri, 2 Aug 2024 09:23:26 +0100	[thread overview]
Message-ID: <ZqyXfonFv1GNlbvK@shell.armlinux.org.uk> (raw)
In-Reply-To: <20240802031822.1862030-3-jitendra.vegiraju@broadcom.com>

On Thu, Aug 01, 2024 at 08:18:21PM -0700, jitendra.vegiraju@broadcom.com wrote:
> +static u32 stmmac_get_user_version(struct stmmac_priv *priv, u32 id_reg)
> +{
> +	u32 reg = readl(priv->ioaddr + id_reg);
> +
> +	if (!reg) {
> +		dev_info(priv->device, "User Version not available\n");
> +		return 0x0;
> +	}
> +
> +	return (reg & GENMASK(23, 16)) >> 16;

	return FIELD_GET(GENMASK(23, 16), reg);

For even more bonus points, use a #define for the field mask.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!


  reply	other threads:[~2024-08-02  8:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02  3:18 [PATCH net-next v3 0/3] net: stmmac: Add PCI driver support for BCM8958x jitendra.vegiraju
2024-08-02  3:18 ` [PATCH net-next v3 1/3] net: stmmac: Add basic dwxgmac4 support to stmmac core jitendra.vegiraju
2024-08-02  8:21   ` Russell King (Oracle)
2024-08-02 21:43     ` Jitendra Vegiraju
2024-08-02 14:38   ` Simon Horman
2024-08-02 21:45     ` Jitendra Vegiraju
2024-08-06 21:56   ` Serge Semin
2024-08-09  0:41     ` Jitendra Vegiraju
2024-08-02  3:18 ` [PATCH net-next v3 2/3] net: stmmac: Integrate dwxgmac4 into stmmac hwif handling jitendra.vegiraju
2024-08-02  8:23   ` Russell King (Oracle) [this message]
2024-08-02 21:49     ` Jitendra Vegiraju
2024-08-02 22:59   ` Andrew Lunn
2024-08-06  0:36     ` Jitendra Vegiraju
2024-08-06 23:13       ` Andrew Lunn
2024-08-09  1:49         ` Jitendra Vegiraju
2024-08-06 22:14   ` Serge Semin
2024-08-09  1:17     ` Jitendra Vegiraju
2024-08-02  3:18 ` [PATCH net-next v3 3/3] net: stmmac: Add PCI driver support for BCM8958x jitendra.vegiraju
2024-08-02 23:08   ` Andrew Lunn
2024-08-06  0:56     ` Jitendra Vegiraju
2024-08-06 23:15       ` Andrew Lunn
2024-08-09  1:54         ` Jitendra Vegiraju
2024-08-09 20:12           ` Andrew Lunn
2024-08-09 22:10             ` Jitendra Vegiraju
2024-08-09 22:17             ` Florian Fainelli
2024-08-10  0:53               ` Andrew Lunn
2024-08-02 10:02 ` [PATCH net-next v3 0/3] " Serge Semin
2024-08-02 22:06   ` Jitendra Vegiraju
2024-08-05 22:43     ` Serge Semin
2024-08-08 23:03       ` Jitendra Vegiraju

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=ZqyXfonFv1GNlbvK@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=jitendra.vegiraju@broadcom.com \
    --cc=joabreu@synopsys.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).