diff options
| author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-10-29 00:03:20 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-10-29 17:18:22 -0700 |
| commit | c36b97e4ca773f20ff20db34ed97e35cc36ad97c (patch) | |
| tree | 4e650a081d12e66789be53f8867e3b7a72d44286 /drivers/usb/cdns3/cdns3-trace.h | |
| parent | f49838f77cf6c50961afa33a5bc1ea95e061d7f0 (diff) | |
net: stmmac: consolidate version reading and validation
There is no need to read the version register twice, once in
stmmac_get_id() and then again in stmmac_get_dev_id(). Consolidate
this into stmmac_get_version() and pass each of these this value.
As both functions unnecessarily issue the same warning for a zero
register value, also move this into stmmac_get_version().
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/E1vDteq-0000000CCC3-3zbJ@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.h')
0 files changed, 0 insertions, 0 deletions
