netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: hns3: make local functions static
@ 2017-10-11  2:35 Wei Yongjun
  2017-10-11 22:22 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2017-10-11  2:35 UTC (permalink / raw)
  To: Yisen Zhuang, Salil Mehta, Lipeng, Yunsheng Lin, Colin Ian King
  Cc: Wei Yongjun, netdev

Fixes the following sparse warnings:

drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c:464:5: warning:
 symbol 'hns3_change_all_ring_bd_num' was not declared. Should it be static?
drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c:477:5: warning:
 symbol 'hns3_set_ringparam' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c
index 9b36ce0..ddbd7f3 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c
@@ -461,7 +461,8 @@ static int hns3_get_rxnfc(struct net_device *netdev,
 	return 0;
 }
 
-int hns3_change_all_ring_bd_num(struct hns3_nic_priv *priv, u32 new_desc_num)
+static int hns3_change_all_ring_bd_num(struct hns3_nic_priv *priv,
+				       u32 new_desc_num)
 {
 	struct hnae3_handle *h = priv->ae_handle;
 	int i;
@@ -474,7 +475,8 @@ int hns3_change_all_ring_bd_num(struct hns3_nic_priv *priv, u32 new_desc_num)
 	return hns3_init_all_ring(priv);
 }
 
-int hns3_set_ringparam(struct net_device *ndev, struct ethtool_ringparam *param)
+static int hns3_set_ringparam(struct net_device *ndev,
+			      struct ethtool_ringparam *param)
 {
 	struct hns3_nic_priv *priv = netdev_priv(ndev);
 	struct hnae3_handle *h = priv->ae_handle;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: hns3: make local functions static
  2017-10-11  2:35 [PATCH net-next] net: hns3: make local functions static Wei Yongjun
@ 2017-10-11 22:22 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-10-11 22:22 UTC (permalink / raw)
  To: weiyongjun1
  Cc: yisen.zhuang, salil.mehta, lipeng321, linyunsheng, colin.king,
	netdev

From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Wed, 11 Oct 2017 02:35:23 +0000

> Fixes the following sparse warnings:
> 
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c:464:5: warning:
>  symbol 'hns3_change_all_ring_bd_num' was not declared. Should it be static?
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c:477:5: warning:
>  symbol 'hns3_set_ringparam' was not declared. Should it be static?
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-11 22:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-11  2:35 [PATCH net-next] net: hns3: make local functions static Wei Yongjun
2017-10-11 22:22 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).