diff mbox series

[net-next] net: dsa: sja1105: Make two functions static

Message ID 20190611135834.21080-1-yuehaibing@huawei.com
State Accepted
Delegated to: David Miller
Headers show
Series [net-next] net: dsa: sja1105: Make two functions static | expand

Commit Message

Yue Haibing June 11, 2019, 1:58 p.m. UTC
Fix sparse warnings:

drivers/net/dsa/sja1105/sja1105_main.c:1848:6:
 warning: symbol 'sja1105_port_rxtstamp' was not declared. Should it be static?
drivers/net/dsa/sja1105/sja1105_main.c:1869:6:
 warning: symbol 'sja1105_port_txtstamp' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/dsa/sja1105/sja1105_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Vladimir Oltean June 11, 2019, 6:31 p.m. UTC | #1
On Tue, 11 Jun 2019 at 16:59, YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fix sparse warnings:
>
> drivers/net/dsa/sja1105/sja1105_main.c:1848:6:
>  warning: symbol 'sja1105_port_rxtstamp' was not declared. Should it be static?
> drivers/net/dsa/sja1105/sja1105_main.c:1869:6:
>  warning: symbol 'sja1105_port_txtstamp' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/net/dsa/sja1105/sja1105_main.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
> index 81e1ba5..9395e8f 100644
> --- a/drivers/net/dsa/sja1105/sja1105_main.c
> +++ b/drivers/net/dsa/sja1105/sja1105_main.c
> @@ -1845,8 +1845,8 @@ static void sja1105_rxtstamp_work(struct work_struct *work)
>  }
>
>  /* Called from dsa_skb_defer_rx_timestamp */
> -bool sja1105_port_rxtstamp(struct dsa_switch *ds, int port,
> -                          struct sk_buff *skb, unsigned int type)
> +static bool sja1105_port_rxtstamp(struct dsa_switch *ds, int port,
> +                                 struct sk_buff *skb, unsigned int type)
>  {
>         struct sja1105_private *priv = ds->priv;
>         struct sja1105_tagger_data *data = &priv->tagger_data;
> @@ -1866,8 +1866,8 @@ bool sja1105_port_rxtstamp(struct dsa_switch *ds, int port,
>   * the skb and have it available in DSA_SKB_CB in the .port_deferred_xmit
>   * callback, where we will timestamp it synchronously.
>   */
> -bool sja1105_port_txtstamp(struct dsa_switch *ds, int port,
> -                          struct sk_buff *skb, unsigned int type)
> +static bool sja1105_port_txtstamp(struct dsa_switch *ds, int port,
> +                                 struct sk_buff *skb, unsigned int type)
>  {
>         struct sja1105_private *priv = ds->priv;
>         struct sja1105_port *sp = &priv->ports[port];
> --
> 2.7.4
>
>

Tested-by: Vladimir Oltean <olteanv@gmail.com>

Thanks!
-Vladimir
David Miller June 13, 2019, 8:59 p.m. UTC | #2
From: YueHaibing <yuehaibing@huawei.com>
Date: Tue, 11 Jun 2019 21:58:34 +0800

> Fix sparse warnings:
> 
> drivers/net/dsa/sja1105/sja1105_main.c:1848:6:
>  warning: symbol 'sja1105_port_rxtstamp' was not declared. Should it be static?
> drivers/net/dsa/sja1105/sja1105_main.c:1869:6:
>  warning: symbol 'sja1105_port_txtstamp' was not declared. Should it be static?
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied.
diff mbox series

Patch

diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index 81e1ba5..9395e8f 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -1845,8 +1845,8 @@  static void sja1105_rxtstamp_work(struct work_struct *work)
 }
 
 /* Called from dsa_skb_defer_rx_timestamp */
-bool sja1105_port_rxtstamp(struct dsa_switch *ds, int port,
-			   struct sk_buff *skb, unsigned int type)
+static bool sja1105_port_rxtstamp(struct dsa_switch *ds, int port,
+				  struct sk_buff *skb, unsigned int type)
 {
 	struct sja1105_private *priv = ds->priv;
 	struct sja1105_tagger_data *data = &priv->tagger_data;
@@ -1866,8 +1866,8 @@  bool sja1105_port_rxtstamp(struct dsa_switch *ds, int port,
  * the skb and have it available in DSA_SKB_CB in the .port_deferred_xmit
  * callback, where we will timestamp it synchronously.
  */
-bool sja1105_port_txtstamp(struct dsa_switch *ds, int port,
-			   struct sk_buff *skb, unsigned int type)
+static bool sja1105_port_txtstamp(struct dsa_switch *ds, int port,
+				  struct sk_buff *skb, unsigned int type)
 {
 	struct sja1105_private *priv = ds->priv;
 	struct sja1105_port *sp = &priv->ports[port];