Skip to content

Commit 54638c6

Browse files
evdenisdavem330
authored andcommitted
net: phy: make exported variables non-static
The variables phy_basic_ports_array, phy_fibre_port_array and phy_all_ports_features_array are declared static and marked EXPORT_SYMBOL_GPL(), which is at best an odd combination. Because the variables were decided to be a part of API, this commit removes the static attributes and adds the declarations to the header. Fixes: 3c1bcc8 ("net: ethernet: Convert phydev advertize and supported from u32 to link mode") Signed-off-by: Denis Efremov <efremov@linux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c1a970d commit 54638c6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

drivers/net/phy/phy_device.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ EXPORT_SYMBOL_GPL(phy_10gbit_features);
5656
__ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_fec_features) __ro_after_init;
5757
EXPORT_SYMBOL_GPL(phy_10gbit_fec_features);
5858

59-
static const int phy_basic_ports_array[] = {
59+
const int phy_basic_ports_array[3] = {
6060
ETHTOOL_LINK_MODE_Autoneg_BIT,
6161
ETHTOOL_LINK_MODE_TP_BIT,
6262
ETHTOOL_LINK_MODE_MII_BIT,
6363
};
6464
EXPORT_SYMBOL_GPL(phy_basic_ports_array);
6565

66-
static const int phy_fibre_port_array[] = {
66+
const int phy_fibre_port_array[1] = {
6767
ETHTOOL_LINK_MODE_FIBRE_BIT,
6868
};
6969
EXPORT_SYMBOL_GPL(phy_fibre_port_array);
7070

71-
static const int phy_all_ports_features_array[] = {
71+
const int phy_all_ports_features_array[7] = {
7272
ETHTOOL_LINK_MODE_Autoneg_BIT,
7373
ETHTOOL_LINK_MODE_TP_BIT,
7474
ETHTOOL_LINK_MODE_MII_BIT,

include/linux/phy.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_full_features) __ro_after_ini
5555
#define PHY_10GBIT_FEC_FEATURES ((unsigned long *)&phy_10gbit_fec_features)
5656
#define PHY_10GBIT_FULL_FEATURES ((unsigned long *)&phy_10gbit_full_features)
5757

58+
extern const int phy_basic_ports_array[3];
59+
extern const int phy_fibre_port_array[1];
60+
extern const int phy_all_ports_features_array[7];
5861
extern const int phy_10_100_features_array[4];
5962
extern const int phy_basic_t1_features_array[2];
6063
extern const int phy_gbit_features_array[2];

0 commit comments

Comments
 (0)