Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: phy: remove leftovers from switch to linkmode bitmaps

We have some leftovers from the switch to linkmode bitmaps which
- have never been used
- are not used any longer
- have no user outside phy_device.c
So remove them.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/5493b96e-88bb-4230-a911-322659ec5167@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Heiner Kallweit and committed by
Jakub Kicinski
12d5151b bff406bc

+2 -70
+2 -52
drivers/net/phy/phy_device.c
··· 60 60 __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_fibre_features) __ro_after_init; 61 61 EXPORT_SYMBOL_GPL(phy_gbit_fibre_features); 62 62 63 - __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_all_ports_features) __ro_after_init; 64 - EXPORT_SYMBOL_GPL(phy_gbit_all_ports_features); 65 - 66 63 __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_features) __ro_after_init; 67 64 EXPORT_SYMBOL_GPL(phy_10gbit_features); 68 - 69 - __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_fec_features) __ro_after_init; 70 - EXPORT_SYMBOL_GPL(phy_10gbit_fec_features); 71 65 72 66 const int phy_basic_ports_array[3] = { 73 67 ETHTOOL_LINK_MODE_Autoneg_BIT, ··· 70 76 }; 71 77 EXPORT_SYMBOL_GPL(phy_basic_ports_array); 72 78 73 - const int phy_fibre_port_array[1] = { 74 - ETHTOOL_LINK_MODE_FIBRE_BIT, 75 - }; 76 - EXPORT_SYMBOL_GPL(phy_fibre_port_array); 77 - 78 - const int phy_all_ports_features_array[7] = { 79 + static const int phy_all_ports_features_array[7] = { 79 80 ETHTOOL_LINK_MODE_Autoneg_BIT, 80 81 ETHTOOL_LINK_MODE_TP_BIT, 81 82 ETHTOOL_LINK_MODE_MII_BIT, ··· 79 90 ETHTOOL_LINK_MODE_BNC_BIT, 80 91 ETHTOOL_LINK_MODE_Backplane_BIT, 81 92 }; 82 - EXPORT_SYMBOL_GPL(phy_all_ports_features_array); 83 93 84 94 const int phy_10_100_features_array[4] = { 85 95 ETHTOOL_LINK_MODE_10baseT_Half_BIT, ··· 111 123 ETHTOOL_LINK_MODE_10000baseT_Full_BIT, 112 124 }; 113 125 EXPORT_SYMBOL_GPL(phy_10gbit_features_array); 114 - 115 - static const int phy_10gbit_fec_features_array[1] = { 116 - ETHTOOL_LINK_MODE_10000baseR_FEC_BIT, 117 - }; 118 - 119 - __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_full_features) __ro_after_init; 120 - EXPORT_SYMBOL_GPL(phy_10gbit_full_features); 121 - 122 - static const int phy_10gbit_full_features_array[] = { 123 - ETHTOOL_LINK_MODE_10baseT_Full_BIT, 124 - ETHTOOL_LINK_MODE_100baseT_Full_BIT, 125 - ETHTOOL_LINK_MODE_1000baseT_Full_BIT, 126 - ETHTOOL_LINK_MODE_10000baseT_Full_BIT, 127 - }; 128 126 129 127 static const int phy_eee_cap1_features_array[] = { 130 128 ETHTOOL_LINK_MODE_100baseT_Full_BIT, ··· 173 199 linkmode_set_bit_array(phy_gbit_features_array, 174 200 ARRAY_SIZE(phy_gbit_features_array), 175 201 phy_gbit_fibre_features); 176 - linkmode_set_bit_array(phy_fibre_port_array, 177 - ARRAY_SIZE(phy_fibre_port_array), 178 - phy_gbit_fibre_features); 179 - 180 - /* 10/100 half/full + 1000 half/full + TP/MII/FIBRE/AUI/BNC/Backplane*/ 181 - linkmode_set_bit_array(phy_all_ports_features_array, 182 - ARRAY_SIZE(phy_all_ports_features_array), 183 - phy_gbit_all_ports_features); 184 - linkmode_set_bit_array(phy_10_100_features_array, 185 - ARRAY_SIZE(phy_10_100_features_array), 186 - phy_gbit_all_ports_features); 187 - linkmode_set_bit_array(phy_gbit_features_array, 188 - ARRAY_SIZE(phy_gbit_features_array), 189 - phy_gbit_all_ports_features); 202 + linkmode_set_bit(ETHTOOL_LINK_MODE_FIBRE_BIT, phy_gbit_fibre_features); 190 203 191 204 /* 10/100 half/full + 1000 half/full + 10G full*/ 192 205 linkmode_set_bit_array(phy_all_ports_features_array, ··· 189 228 ARRAY_SIZE(phy_10gbit_features_array), 190 229 phy_10gbit_features); 191 230 192 - /* 10/100/1000/10G full */ 193 - linkmode_set_bit_array(phy_all_ports_features_array, 194 - ARRAY_SIZE(phy_all_ports_features_array), 195 - phy_10gbit_full_features); 196 - linkmode_set_bit_array(phy_10gbit_full_features_array, 197 - ARRAY_SIZE(phy_10gbit_full_features_array), 198 - phy_10gbit_full_features); 199 - /* 10G FEC only */ 200 - linkmode_set_bit_array(phy_10gbit_fec_features_array, 201 - ARRAY_SIZE(phy_10gbit_fec_features_array), 202 - phy_10gbit_fec_features); 203 231 linkmode_set_bit_array(phy_eee_cap1_features_array, 204 232 ARRAY_SIZE(phy_eee_cap1_features_array), 205 233 phy_eee_cap1_features);
-18
include/linux/phy.h
··· 32 32 #include <linux/atomic.h> 33 33 #include <net/eee.h> 34 34 35 - #define PHY_DEFAULT_FEATURES (SUPPORTED_Autoneg | \ 36 - SUPPORTED_TP | \ 37 - SUPPORTED_MII) 38 - 39 - #define PHY_10BT_FEATURES (SUPPORTED_10baseT_Half | \ 40 - SUPPORTED_10baseT_Full) 41 - 42 - #define PHY_100BT_FEATURES (SUPPORTED_100baseT_Half | \ 43 - SUPPORTED_100baseT_Full) 44 - 45 - #define PHY_1000BT_FEATURES (SUPPORTED_1000baseT_Half | \ 46 - SUPPORTED_1000baseT_Full) 47 - 48 35 extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_basic_features) __ro_after_init; 49 36 extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_basic_t1_features) __ro_after_init; 50 37 extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_basic_t1s_p2mp_features) __ro_after_init; ··· 49 62 #define PHY_BASIC_T1S_P2MP_FEATURES ((unsigned long *)&phy_basic_t1s_p2mp_features) 50 63 #define PHY_GBIT_FEATURES ((unsigned long *)&phy_gbit_features) 51 64 #define PHY_GBIT_FIBRE_FEATURES ((unsigned long *)&phy_gbit_fibre_features) 52 - #define PHY_GBIT_ALL_PORTS_FEATURES ((unsigned long *)&phy_gbit_all_ports_features) 53 65 #define PHY_10GBIT_FEATURES ((unsigned long *)&phy_10gbit_features) 54 - #define PHY_10GBIT_FEC_FEATURES ((unsigned long *)&phy_10gbit_fec_features) 55 - #define PHY_10GBIT_FULL_FEATURES ((unsigned long *)&phy_10gbit_full_features) 56 66 #define PHY_EEE_CAP1_FEATURES ((unsigned long *)&phy_eee_cap1_features) 57 67 #define PHY_EEE_CAP2_FEATURES ((unsigned long *)&phy_eee_cap2_features) 58 68 59 69 extern const int phy_basic_ports_array[3]; 60 - extern const int phy_fibre_port_array[1]; 61 - extern const int phy_all_ports_features_array[7]; 62 70 extern const int phy_10_100_features_array[4]; 63 71 extern const int phy_basic_t1_features_array[3]; 64 72 extern const int phy_basic_t1s_p2mp_features_array[2];