[PATCH] staging/rtl8192e: Fix compile warning 'is static but declared in .. which is not static'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When compiling this driver I get these compile warnings:

rtllib.h:2573:2: warning: '______f' is static but declared in inline
function 'rtllib_is_empty_essid' which is not static [enabled by
default]
rtllib.h:2579:3: warning: '______f' is static but declared in inline
function 'rtllib_is_empty_essid' which is not static [enabled by
default]
rtllib.h:2594:2: warning: '______f' is static but declared in inline
function 'rtllib_is_valid_mode' which is not static [enabled by default]
rtllib.h:2599:2: warning: '______f' is static but declared in inline
function 'rtllib_is_valid_mode' which is not static [enabled by default]
rtllib.h:2604:2: warning: '______f' is static but declared in inline
function 'rtllib_is_valid_mode' which is not static [enabled by default]
rtllib.h:2618:3: warning: '______f' is static but declared in inline
function 'rtllib_get_hdrlen' which is not static [enabled by default]
rtllib.h:2620:3: warning: '______f' is static but declared in inline
function 'rtllib_get_hdrlen' which is not static [enabled by default]

These functions are declared as extern inline but not 'overloaded'
anywhere so we can declare them static inline and get rid of the
warnings.

Signed-off-by: Peter Huewe <peterhuewe@xxxxxx>
---
 drivers/staging/rtl8192e/rtllib.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 9ac8d8e..3485ef1 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -2567,7 +2567,7 @@ static inline void *rtllib_priv(struct net_device *dev)
 	return ((struct rtllib_device *)netdev_priv(dev))->priv;
 }
 
-extern inline int rtllib_is_empty_essid(const char *essid, int essid_len)
+static inline int rtllib_is_empty_essid(const char *essid, int essid_len)
 {
 	/* Single white space is for Linksys APs */
 	if (essid_len == 1 && essid[0] == ' ')
@@ -2583,7 +2583,7 @@ extern inline int rtllib_is_empty_essid(const char *essid, int essid_len)
 	return 1;
 }
 
-extern inline int rtllib_is_valid_mode(struct rtllib_device *ieee, int mode)
+static inline int rtllib_is_valid_mode(struct rtllib_device *ieee, int mode)
 {
 	/*
 	 * It is possible for both access points and our device to support
@@ -2609,7 +2609,7 @@ extern inline int rtllib_is_valid_mode(struct rtllib_device *ieee, int mode)
 	return 0;
 }
 
-extern inline int rtllib_get_hdrlen(u16 fc)
+static inline int rtllib_get_hdrlen(u16 fc)
 {
 	int hdrlen = RTLLIB_3ADDR_LEN;
 
-- 
1.7.8.6

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux