]> git.baikalelectronics.ru Git - kernel.git/commit
phy: warn if phylib and ethtool PHY mode definitions are out of sync
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 13 Apr 2019 18:53:43 +0000 (20:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 14 Apr 2019 20:37:06 +0000 (13:37 -0700)
commit00ab6bb637f4b657f101f184101008fe420a0afc
treeca3e7147f9ecf0ed05d5afbc3fa9597cc4766fa2
parenta6e7ee71778250f0c82515339c636a4073ff387e
phy: warn if phylib and ethtool PHY mode definitions are out of sync

If new PHY modes are added people may miss to update all relevant places
in the kernel. Therefore add a build bug check for new modes in enum
ethtool_link_mode_bit_indices that haven't been added to phylib yet.

Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy-core.c