* [PATCH] qede: mark qede_set_features() static
@ 2016-09-08 8:43 Baoyou Xie
2016-09-08 9:02 ` Yuval Mintz
2016-09-10 1:16 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Baoyou Xie @ 2016-09-08 8:43 UTC (permalink / raw)
To: Yuval.Mintz, Ariel.Elior, everest-linux-l2
Cc: netdev, linux-kernel, arnd, baoyou.xie, xie.baoyou
We get 1 warning when building kernel with W=1:
drivers/net/ethernet/qlogic/qede/qede_main.c:2113:5: warning: no previous prototype for 'qede_set_features' [-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/qlogic/qede/qede_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index e4bd02e..4d2ce65 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -2110,7 +2110,7 @@ static void qede_vlan_mark_nonconfigured(struct qede_dev *edev)
edev->accept_any_vlan = false;
}
-int qede_set_features(struct net_device *dev, netdev_features_t features)
+static int qede_set_features(struct net_device *dev, netdev_features_t features)
{
struct qede_dev *edev = netdev_priv(dev);
netdev_features_t changes = features ^ dev->features;
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] qede: mark qede_set_features() static
2016-09-08 8:43 [PATCH] qede: mark qede_set_features() static Baoyou Xie
@ 2016-09-08 9:02 ` Yuval Mintz
2016-09-10 1:16 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Yuval Mintz @ 2016-09-08 9:02 UTC (permalink / raw)
To: Baoyou Xie; +Cc: netdev, linux-kernel, arnd, xie.baoyou, Ariel Elior
> We get 1 warning when building kernel with W=1:
> drivers/net/ethernet/qlogic/qede/qede_main.c:2113:5: warning: no previous
> prototype for 'qede_set_features' [-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>
Thanks.
Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] qede: mark qede_set_features() static
2016-09-08 8:43 [PATCH] qede: mark qede_set_features() static Baoyou Xie
2016-09-08 9:02 ` Yuval Mintz
@ 2016-09-10 1:16 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-09-10 1:16 UTC (permalink / raw)
To: baoyou.xie
Cc: Yuval.Mintz, Ariel.Elior, everest-linux-l2, netdev, linux-kernel,
arnd, xie.baoyou
From: Baoyou Xie <baoyou.xie@linaro.org>
Date: Thu, 8 Sep 2016 16:43:23 +0800
> We get 1 warning when building kernel with W=1:
> drivers/net/ethernet/qlogic/qede/qede_main.c:2113:5: warning: no previous prototype for 'qede_set_features' [-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] 3+ messages in thread
end of thread, other threads:[~2016-09-10 1:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08 8:43 [PATCH] qede: mark qede_set_features() static Baoyou Xie
2016-09-08 9:02 ` Yuval Mintz
2016-09-10 1:16 ` 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).