]> git.ipfire.org Git - thirdparty/linux.git/commit
net: stmmac: simplify stmmac_get_version()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 29 Oct 2025 00:03:15 +0000 (00:03 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Oct 2025 00:18:22 +0000 (17:18 -0700)
commitf49838f77cf6c50961afa33a5bc1ea95e061d7f0
tree1cc3ce14357028fa454097435c8c7bb770a14341
parentfc18b6e98cce2380e8f31b0e5089b11ceecb541d
net: stmmac: simplify stmmac_get_version()

We can simplify stmmac_get_version() by pre-initialising the version
members to zero, detecting the MAC100 core and returning, otherwise
determining the version register offset separately from calling
stmmac_get_id() and stmmac_get_dev_id(). Do this.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vDtel-0000000CCBx-3Lpf@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/hwif.c