diff mbox

igb: mark igb_rxnfc_write_vlan_prio_filter() static

Message ID 1474783558-7384-1-git-send-email-baoyou.xie@linaro.org
State New
Headers show

Commit Message

Baoyou Xie Sept. 25, 2016, 6:05 a.m. UTC
We get 1 warning when building kernel with W=1:
drivers/net/ethernet/intel/igb/igb_ethtool.c:2707:5: warning: no previous prototype for 'igb_rxnfc_write_vlan_prio_filter' [-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/intel/igb/igb_ethtool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4

Comments

Jeff Kirsher Sept. 25, 2016, 10:23 p.m. UTC | #1
On Sun, 2016-09-25 at 14:05 +0800, Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:

> drivers/net/ethernet/intel/igb/igb_ethtool.c:2707:5: warning: no previous

> prototype for 'igb_rxnfc_write_vlan_prio_filter' [-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/intel/igb/igb_ethtool.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)


This has been fixed as well, and there is already a patch.
diff mbox

Patch

diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 0c33eca..737b664 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -2704,8 +2704,8 @@  static int igb_rxnfc_write_etype_filter(struct igb_adapter *adapter,
 	return 0;
 }
 
-int igb_rxnfc_write_vlan_prio_filter(struct igb_adapter *adapter,
-				     struct igb_nfc_filter *input)
+static int igb_rxnfc_write_vlan_prio_filter(struct igb_adapter *adapter,
+					    struct igb_nfc_filter *input)
 {
 	struct e1000_hw *hw = &adapter->hw;
 	u8 vlan_priority;