Subject: Re: [PATCH net-next] net: dsa: Make PHYLINK related function static again

From: Russell King - ARM Linux admin <[email-masked]>
Date: Mon, 16 Dec 2019 18:55:30 +0000

On Mon, Dec 16, 2019 at 10:32:47AM -0800, Florian Fainelli wrote:
> Commit 77373d49de22 ("net: dsa: Move the phylink driver calls into
> port.c") moved and exported a bunch of symbols, but they are not used
> outside of net/dsa/port.c at the moment, so no reason to export them.
> 
> Reported-by: Russell King <[email-masked]>
> Signed-off-by: Florian Fainelli <[email-masked]>

Acked-by: Russell King <[email-masked]>

Thanks.

> ---
>  net/dsa/dsa_priv.h | 16 ----------------
>  net/dsa/port.c     | 38 ++++++++++++++++----------------------
>  2 files changed, 16 insertions(+), 38 deletions(-)
> 
> diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
> index 2dd86d9bcda9..09ea2fd78c74 100644
> --- a/net/dsa/dsa_priv.h
> +++ b/net/dsa/dsa_priv.h
> @@ -150,22 +150,6 @@ int dsa_port_vid_add(struct dsa_port *dp, u16 vid, u16 flags);
>  int dsa_port_vid_del(struct dsa_port *dp, u16 vid);
>  int dsa_port_link_register_of(struct dsa_port *dp);
>  void dsa_port_link_unregister_of(struct dsa_port *dp);
> -void dsa_port_phylink_validate(struct phylink_config *config,
> -			       unsigned long *supported,
> -			       struct phylink_link_state *state);
> -void dsa_port_phylink_mac_pcs_get_state(struct phylink_config *config,
> -					struct phylink_link_state *state);
> -void dsa_port_phylink_mac_config(struct phylink_config *config,
> -				 unsigned int mode,
> -				 const struct phylink_link_state *state);
> -void dsa_port_phylink_mac_an_restart(struct phylink_config *config);
> -void dsa_port_phylink_mac_link_down(struct phylink_config *config,
> -				    unsigned int mode,
> -				    phy_interface_t interface);
> -void dsa_port_phylink_mac_link_up(struct phylink_config *config,
> -				  unsigned int mode,
> -				  phy_interface_t interface,
> -				  struct phy_device *phydev);
>  extern const struct phylink_mac_ops dsa_port_phylink_mac_ops;
>  
>  /* slave.c */
> diff --git a/net/dsa/port.c b/net/dsa/port.c
> index 46ac9ba21987..ffb5601f7ed6 100644
> --- a/net/dsa/port.c
> +++ b/net/dsa/port.c
> @@ -415,9 +415,9 @@ static struct phy_device *dsa_port_get_phy_device(struct dsa_port *dp)
>  	return phydev;
>  }
>  
> -void dsa_port_phylink_validate(struct phylink_config *config,
> -			       unsigned long *supported,
> -			       struct phylink_link_state *state)
> +static void dsa_port_phylink_validate(struct phylink_config *config,
> +				      unsigned long *supported,
> +				      struct phylink_link_state *state)
>  {
>  	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
>  	struct dsa_switch *ds = dp->ds;
> @@ -427,10 +427,9 @@ void dsa_port_phylink_validate(struct phylink_config *config,
>  
>  	ds->ops->phylink_validate(ds, dp->index, supported, state);
>  }
> -EXPORT_SYMBOL_GPL(dsa_port_phylink_validate);
>  
> -void dsa_port_phylink_mac_pcs_get_state(struct phylink_config *config,
> -					struct phylink_link_state *state)
> +static void dsa_port_phylink_mac_pcs_get_state(struct phylink_config *config,
> +					       struct phylink_link_state *state)
>  {
>  	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
>  	struct dsa_switch *ds = dp->ds;
> @@ -444,11 +443,10 @@ void dsa_port_phylink_mac_pcs_get_state(struct phylink_config *config,
>  	if (ds->ops->phylink_mac_link_state(ds, dp->index, state) < 0)
>  		state->link = 0;
>  }
> -EXPORT_SYMBOL_GPL(dsa_port_phylink_mac_pcs_get_state);
>  
> -void dsa_port_phylink_mac_config(struct phylink_config *config,
> -				 unsigned int mode,
> -				 const struct phylink_link_state *state)
> +static void dsa_port_phylink_mac_config(struct phylink_config *config,
> +					unsigned int mode,
> +					const struct phylink_link_state *state)
>  {
>  	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
>  	struct dsa_switch *ds = dp->ds;
> @@ -458,9 +456,8 @@ void dsa_port_phylink_mac_config(struct phylink_config *config,
>  
>  	ds->ops->phylink_mac_config(ds, dp->index, mode, state);
>  }
> -EXPORT_SYMBOL_GPL(dsa_port_phylink_mac_config);
>  
> -void dsa_port_phylink_mac_an_restart(struct phylink_config *config)
> +static void dsa_port_phylink_mac_an_restart(struct phylink_config *config)
>  {
>  	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
>  	struct dsa_switch *ds = dp->ds;
> @@ -470,11 +467,10 @@ void dsa_port_phylink_mac_an_restart(struct phylink_config *config)
>  
>  	ds->ops->phylink_mac_an_restart(ds, dp->index);
>  }
> -EXPORT_SYMBOL_GPL(dsa_port_phylink_mac_an_restart);
>  
> -void dsa_port_phylink_mac_link_down(struct phylink_config *config,
> -				    unsigned int mode,
> -				    phy_interface_t interface)
> +static void dsa_port_phylink_mac_link_down(struct phylink_config *config,
> +					   unsigned int mode,
> +					   phy_interface_t interface)
>  {
>  	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
>  	struct phy_device *phydev = NULL;
> @@ -491,12 +487,11 @@ void dsa_port_phylink_mac_link_down(struct phylink_config *config,
>  
>  	ds->ops->phylink_mac_link_down(ds, dp->index, mode, interface);
>  }
> -EXPORT_SYMBOL_GPL(dsa_port_phylink_mac_link_down);
>  
> -void dsa_port_phylink_mac_link_up(struct phylink_config *config,
> -				  unsigned int mode,
> -				  phy_interface_t interface,
> -				  struct phy_device *phydev)
> +static void dsa_port_phylink_mac_link_up(struct phylink_config *config,
> +					 unsigned int mode,
> +					 phy_interface_t interface,
> +					 struct phy_device *phydev)
>  {
>  	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
>  	struct dsa_switch *ds = dp->ds;
> @@ -509,7 +504,6 @@ void dsa_port_phylink_mac_link_up(struct phylink_config *config,
>  
>  	ds->ops->phylink_mac_link_up(ds, dp->index, mode, interface, phydev);
>  }
> -EXPORT_SYMBOL_GPL(dsa_port_phylink_mac_link_up);
>  
>  const struct phylink_mac_ops dsa_port_phylink_mac_ops = {
>  	.validate = dsa_port_phylink_validate,
> -- 
> 2.17.1
> 
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up