mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
net: stmmac: remove ptpaddr/mmcaddr/estaddr "safe" initialization
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> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20260803135745.12600-1-jszhang@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
828c4a5a95
commit
95a390ce6a
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user