* [PATCH] cxgb4: mark cxgb_setup_tc() static
@ 2016-09-30 7:34 Baoyou Xie
2016-10-03 5:20 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Baoyou Xie @ 2016-09-30 7:34 UTC (permalink / raw)
To: hariprasad
Cc: netdev, linux-kernel, arnd, baoyou.xie, xie.baoyou, han.fei,
tang.qiang007
We get 1 warning when building kernel with W=1:
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:2715:5: warning: no previous prototype for 'cxgb_setup_tc' [-Wmissing-prototypes]
In fact, this function is only used in the file in which it is
declared and don't need a declaration, but can be made static.
so this patch marks this function with 'static'.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index c8a5c43..08e69d3 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2712,8 +2712,8 @@ static int cxgb_set_tx_maxrate(struct net_device *dev, int index, u32 rate)
return err;
}
-int cxgb_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
- struct tc_to_netdev *tc)
+static int cxgb_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
+ struct tc_to_netdev *tc)
{
struct port_info *pi = netdev2pinfo(dev);
struct adapter *adap = netdev2adap(dev);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cxgb4: mark cxgb_setup_tc() static
2016-09-30 7:34 [PATCH] cxgb4: mark cxgb_setup_tc() static Baoyou Xie
@ 2016-10-03 5:20 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-10-03 5:20 UTC (permalink / raw)
To: baoyou.xie
Cc: hariprasad, netdev, linux-kernel, arnd, xie.baoyou, han.fei,
tang.qiang007
From: Baoyou Xie <baoyou.xie@linaro.org>
Date: Fri, 30 Sep 2016 15:34:25 +0800
> We get 1 warning when building kernel with W=1:
> drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:2715:5: warning: no previous prototype for 'cxgb_setup_tc' [-Wmissing-prototypes]
>
> In fact, this function is only used in the file in which it is
> declared and don't need a declaration, but can be made static.
> so this patch marks this function with 'static'.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-03 5:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-30 7:34 [PATCH] cxgb4: mark cxgb_setup_tc() static Baoyou Xie
2016-10-03 5:20 ` 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).