From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Jisheng Zhang <jszhang@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Russell King <rmk+kernel@armlinux.org.uk>,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: stmmac: remove ptpaddr/mmcaddr/estaddr "safe" initialization
Date: Mon, 3 Aug 2026 22:27:31 +0200 [thread overview]
Message-ID: <a12aaa08-d6d8-4710-a053-6eb06c7c62cb@bootlin.com> (raw)
In-Reply-To: <20260803135745.12600-1-jszhang@kernel.org>
Hi,
Don't forget to put the tree name in the subject please :
https://docs.kernel.org/process/maintainer-netdev.html
That one's for net-next, thanks for the cleanup
On 8/3/26 15:57, Jisheng Zhang wrote:
> These so called "safe" initializations aren't needed any more from
> sometime, but the unnecessaries are obvious after recent clean up
> by Russell. The code will correctly initialize them after getting
> the correct stmmac_hwif_entry by calling stmmac_hwif_find().
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
> drivers/net/ethernet/stmicro/stmmac/hwif.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.c b/drivers/net/ethernet/stmicro/stmmac/hwif.c
> index 511b0fd5e834..265671170bf6 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/hwif.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/hwif.c
> @@ -328,18 +328,6 @@ int stmmac_hwif_init(struct stmmac_priv *priv)
> /* Save ID for later use */
> priv->synopsys_id = version.snpsver;
>
> - /* Lets assume some safe values first */
> - if (core_type == DWMAC_CORE_GMAC4) {
> - priv->ptpaddr = priv->ioaddr + PTP_GMAC4_OFFSET;
> - priv->mmcaddr = priv->ioaddr + MMC_GMAC4_OFFSET;
> - priv->estaddr = priv->ioaddr + EST_GMAC4_OFFSET;
> - } else {
> - priv->ptpaddr = priv->ioaddr + PTP_GMAC3_X_OFFSET;
> - priv->mmcaddr = priv->ioaddr + MMC_GMAC3_X_OFFSET;
> - if (core_type == DWMAC_CORE_XGMAC)
> - priv->estaddr = priv->ioaddr + EST_XGMAC_OFFSET;
> - }
> -
> mac = devm_kzalloc(priv->device, sizeof(*mac), GFP_KERNEL);
> if (!mac)
> return -ENOMEM;
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
next prev parent reply other threads:[~2026-08-03 20:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 13:57 [PATCH] net: stmmac: remove ptpaddr/mmcaddr/estaddr "safe" initialization Jisheng Zhang
2026-08-03 20:27 ` Maxime Chevallier [this message]
2026-08-04 21:50 ` patchwork-bot+netdevbpf
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=a12aaa08-d6d8-4710-a053-6eb06c7c62cb@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jszhang@kernel.org \
--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=rmk+kernel@armlinux.org.uk \
/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