Skip to content

Commit 12d5151

Browse files
hkallweitkuba-moo
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent bff406b commit 12d5151

File tree

2 files changed

+2
-70
lines changed

2 files changed

+2
-70
lines changed

drivers/net/phy/phy_device.c

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -60,28 +60,17 @@ EXPORT_SYMBOL_GPL(phy_gbit_features);
6060
__ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_fibre_features) __ro_after_init;
6161
EXPORT_SYMBOL_GPL(phy_gbit_fibre_features);
6262

63-
__ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_all_ports_features) __ro_after_init;
64-
EXPORT_SYMBOL_GPL(phy_gbit_all_ports_features);
65-
6663
__ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_features) __ro_after_init;
6764
EXPORT_SYMBOL_GPL(phy_10gbit_features);
6865

69-
__ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_fec_features) __ro_after_init;
70-
EXPORT_SYMBOL_GPL(phy_10gbit_fec_features);
71-
7266
const int phy_basic_ports_array[3] = {
7367
ETHTOOL_LINK_MODE_Autoneg_BIT,
7468
ETHTOOL_LINK_MODE_TP_BIT,
7569
ETHTOOL_LINK_MODE_MII_BIT,
7670
};
7771
EXPORT_SYMBOL_GPL(phy_basic_ports_array);
7872

79-
const int phy_fibre_port_array[1] = {
80-
ETHTOOL_LINK_MODE_FIBRE_BIT,
81-
};
82-
EXPORT_SYMBOL_GPL(phy_fibre_port_array);
83-
84-
const int phy_all_ports_features_array[7] = {
73+
static const int phy_all_ports_features_array[7] = {
8574
ETHTOOL_LINK_MODE_Autoneg_BIT,
8675
ETHTOOL_LINK_MODE_TP_BIT,
8776
ETHTOOL_LINK_MODE_MII_BIT,
@@ -90,7 +79,6 @@ const int phy_all_ports_features_array[7] = {
9079
ETHTOOL_LINK_MODE_BNC_BIT,
9180
ETHTOOL_LINK_MODE_Backplane_BIT,
9281
};
93-
EXPORT_SYMBOL_GPL(phy_all_ports_features_array);
9482

9583
const int phy_10_100_features_array[4] = {
9684
ETHTOOL_LINK_MODE_10baseT_Half_BIT,
@@ -124,20 +112,6 @@ const int phy_10gbit_features_array[1] = {
124112
};
125113
EXPORT_SYMBOL_GPL(phy_10gbit_features_array);
126114

127-
static const int phy_10gbit_fec_features_array[1] = {
128-
ETHTOOL_LINK_MODE_10000baseR_FEC_BIT,
129-
};
130-
131-
__ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_full_features) __ro_after_init;
132-
EXPORT_SYMBOL_GPL(phy_10gbit_full_features);
133-
134-
static const int phy_10gbit_full_features_array[] = {
135-
ETHTOOL_LINK_MODE_10baseT_Full_BIT,
136-
ETHTOOL_LINK_MODE_100baseT_Full_BIT,
137-
ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
138-
ETHTOOL_LINK_MODE_10000baseT_Full_BIT,
139-
};
140-
141115
static const int phy_eee_cap1_features_array[] = {
142116
ETHTOOL_LINK_MODE_100baseT_Full_BIT,
143117
ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
@@ -199,20 +173,7 @@ static void features_init(void)
199173
linkmode_set_bit_array(phy_gbit_features_array,
200174
ARRAY_SIZE(phy_gbit_features_array),
201175
phy_gbit_fibre_features);
202-
linkmode_set_bit_array(phy_fibre_port_array,
203-
ARRAY_SIZE(phy_fibre_port_array),
204-
phy_gbit_fibre_features);
205-
206-
/* 10/100 half/full + 1000 half/full + TP/MII/FIBRE/AUI/BNC/Backplane*/
207-
linkmode_set_bit_array(phy_all_ports_features_array,
208-
ARRAY_SIZE(phy_all_ports_features_array),
209-
phy_gbit_all_ports_features);
210-
linkmode_set_bit_array(phy_10_100_features_array,
211-
ARRAY_SIZE(phy_10_100_features_array),
212-
phy_gbit_all_ports_features);
213-
linkmode_set_bit_array(phy_gbit_features_array,
214-
ARRAY_SIZE(phy_gbit_features_array),
215-
phy_gbit_all_ports_features);
176+
linkmode_set_bit(ETHTOOL_LINK_MODE_FIBRE_BIT, phy_gbit_fibre_features);
216177

217178
/* 10/100 half/full + 1000 half/full + 10G full*/
218179
linkmode_set_bit_array(phy_all_ports_features_array,
@@ -228,17 +189,6 @@ static void features_init(void)
228189
ARRAY_SIZE(phy_10gbit_features_array),
229190
phy_10gbit_features);
230191

231-
/* 10/100/1000/10G full */
232-
linkmode_set_bit_array(phy_all_ports_features_array,
233-
ARRAY_SIZE(phy_all_ports_features_array),
234-
phy_10gbit_full_features);
235-
linkmode_set_bit_array(phy_10gbit_full_features_array,
236-
ARRAY_SIZE(phy_10gbit_full_features_array),
237-
phy_10gbit_full_features);
238-
/* 10G FEC only */
239-
linkmode_set_bit_array(phy_10gbit_fec_features_array,
240-
ARRAY_SIZE(phy_10gbit_fec_features_array),
241-
phy_10gbit_fec_features);
242192
linkmode_set_bit_array(phy_eee_cap1_features_array,
243193
ARRAY_SIZE(phy_eee_cap1_features_array),
244194
phy_eee_cap1_features);

include/linux/phy.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,6 @@
3232
#include <linux/atomic.h>
3333
#include <net/eee.h>
3434

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-
4835
extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_basic_features) __ro_after_init;
4936
extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_basic_t1_features) __ro_after_init;
5037
extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_basic_t1s_p2mp_features) __ro_after_init;
@@ -62,16 +49,11 @@ extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_eee_cap2_features) __ro_after_init;
6249
#define PHY_BASIC_T1S_P2MP_FEATURES ((unsigned long *)&phy_basic_t1s_p2mp_features)
6350
#define PHY_GBIT_FEATURES ((unsigned long *)&phy_gbit_features)
6451
#define PHY_GBIT_FIBRE_FEATURES ((unsigned long *)&phy_gbit_fibre_features)
65-
#define PHY_GBIT_ALL_PORTS_FEATURES ((unsigned long *)&phy_gbit_all_ports_features)
6652
#define PHY_10GBIT_FEATURES ((unsigned long *)&phy_10gbit_features)
67-
#define PHY_10GBIT_FEC_FEATURES ((unsigned long *)&phy_10gbit_fec_features)
68-
#define PHY_10GBIT_FULL_FEATURES ((unsigned long *)&phy_10gbit_full_features)
6953
#define PHY_EEE_CAP1_FEATURES ((unsigned long *)&phy_eee_cap1_features)
7054
#define PHY_EEE_CAP2_FEATURES ((unsigned long *)&phy_eee_cap2_features)
7155

7256
extern const int phy_basic_ports_array[3];
73-
extern const int phy_fibre_port_array[1];
74-
extern const int phy_all_ports_features_array[7];
7557
extern const int phy_10_100_features_array[4];
7658
extern const int phy_basic_t1_features_array[3];
7759
extern const int phy_basic_t1s_p2mp_features_array[2];

0 commit comments

Comments
 (0)