]> asedeno.scripts.mit.edu Git - linux.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)
commitc6576bfe2f4baa6cbbcd50a4dcd17e843e28fcd7
treeca3e7147f9ecf0ed05d5afbc3fa9597cc4766fa2
parent5a3144e419562181bb223de68173b90a8163ebfd
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