Skip to contentSkip to conversation

staging: rtl8192u: r8192U_wx: Fix sparse warnings

PATCH In review Matei Oprea 2 participants 2 messages Mar 21, 2014 – Apr 18, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8192u: r8192U_wx: Fix sparse warnings

Fix sparse "should be static" warnings. Those structures are only referenced in file scope so they can be marked as static.

Cc ROSEdu Kernel Community <[email protected]>
---
 drivers/staging/rtl8192u/r8192U_wx.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/r8192U_wx.c +3 -3
index c70af01..1a3e80d 100644
@@ -24,7 +24,7 @@
 #include "dot11d.h"
 
 #define RATE_COUNT 12
-u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000,
+static u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000,
 	6000000,9000000,12000000,18000000,24000000,36000000,48000000,54000000};
 
 
@@ -979,7 +979,7 @@ static iw_handler r8192_private_handler[] = {
 };
 
 //#if WIRELESS_EXT >= 17
-struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
+static struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
 	struct ieee80211_device *ieee = priv->ieee80211;
@@ -1010,7 +1010,7 @@ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
 //#endif
 
 
-struct iw_handler_def  r8192_wx_handlers_def={
+static struct iw_handler_def  r8192_wx_handlers_def={
 	.standard = r8192_wx_handlers,
 	.num_standard = ARRAY_SIZE(r8192_wx_handlers),
 	.private = r8192_private_handler,
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw
Quoted 8 lines · Matei Oprea

Fix sparse "should be static" warnings. Those structures are only referenced in file scope so they can be marked as static.

Cc ROSEdu Kernel Community <[email protected]>
---
 drivers/staging/rtl8192u/r8192U_wx.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

This patch breaks the build, how did you test it?