]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: phy: simplify PHY fixup registration
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 18 Jan 2026 22:16:27 +0000 (23:16 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 21 Jan 2026 02:56:46 +0000 (18:56 -0800)
commit0d035fb5dcd925385e607605c57acc7a5c6eee75
tree8ca1981dd2e46fb866669134c0add4cd78557da5
parent1be080b78fd37fffe27b15edf19a3ff1b3867fe4
net: phy: simplify PHY fixup registration

Based on the fact that either bus_id-based matching or phy_uid-based
matching is used, the code can be simplified. PHY_ANY_ID and
PHY_ANY_UID are not needed. Ensure that phy_id_compare() is called
only if phy_uid_mask isn't zero, because a zero value would always
result in a match.
In addition change the return value type of phy_needs_fixup() to bool.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/e7394cc8-5895-4d02-a8fe-802345c7c547@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phy_device.c