Skip to contentSkip to conversation

staging: vt6655: update out-of-date function declaration

PATCH In review James A Shackleford 2 participants 5 messages Jun 2, 2014 – Jun 20, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 staging: vt6655: update out-of-date function declaration

The function iwctl_siwscan() is defined in iwctl.c as:
int iwctl_siwscan(struct net_device *dev,
struct iw_request_info *info, struct iw_point *wrq,
char *extra)
{
...

This patch updates iwctl.h so that the type of the 3rd parameter (*wqr) in the function declaration matches the definition.

---
 drivers/staging/vt6655/iwctl.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/iwctl.h +1 -1
index 871bd7c..4ad5e48 100644
@@ -168,7 +168,7 @@ int iwctl_giwscan(struct net_device *dev,
 
 int iwctl_siwscan(struct net_device *dev,
 		  struct iw_request_info *info,
-		  struct iw_param *wrq,
+		  struct iw_point *wrq,
 		  char *extra);
 
 //2008-0409-07, <Add> by Einsn Liu
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/3 staging: vt6655: update iwctl_private_args extern declaration

Update declaration of iwctl_private_args to match definition in iwctl.c

---
 drivers/staging/vt6655/iwctl.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/iwctl.h +1 -1
index 4ad5e48..10564b4 100644
@@ -211,6 +211,6 @@ int iwctl_siwmlme(struct net_device *dev,
 //End Add -- //2008-0409-07, <Add> by Einsn Liu
 
 extern const struct iw_handler_def	iwctl_handler_def;
-extern const struct iw_priv_args	iwctl_private_args;
+extern struct iw_priv_args       iwctl_private_args[];
 
 #endif // __IWCTL_H__
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 3/3 staging: vt6655: fix sparse warning for static declarations

This patch fixes the following sparse warnings:

iwctl.c:76:22: warning: symbol 'iwctl_get_wireless_stats' was not declared. Should it be static? iwctl.c:118:5: warning: symbol 'iwctl_giwname' was not declared. Should it be static? iwctl.c:131:5: warning: symbol 'iwctl_siwscan' was not declared. Should it be static? iwctl.c:192:5: warning: symbol 'iwctl_giwscan' was not declared. Should it be static? iwctl.c:344:5: warning: symbol 'iwctl_siwfreq' was not declared. Should it be static? iwctl.c:390:5: warning: symbol 'iwctl_giwfreq' was not declared. Should it be static? iwctl.c:420:5: warning: symbol 'iwctl_siwmode' was not declared. Should it be static? iwctl.c:486:5: warning: symbol 'iwctl_giwmode' was not declared. Should it be static? iwctl.c:520:5: warning: symbol 'iwctl_giwrange' was not declared. Should it be static? iwctl.c:626:5: warning: symbol 'iwctl_siwap' was not declared. Should it be static? iwctl.c:684:5: warning: symbol 'iwctl_giwap' was not declared. Should it be static? iwctl.c:711:5: warning: symbol 'iwctl_giwaplist' was not declared. Should it be static? iwctl.c:784:5: warning: symbol 'iwctl_siwessid' was not declared. Should it be static? iwctl.c:893:5: warning: symbol 'iwctl_giwessid' was not declared. Should it be static? iwctl.c:923:5: warning: symbol 'iwctl_siwrate' was not declared. Should it be static? iwctl.c:1004:5: warning: symbol 'iwctl_giwrate' was not declared. Should it be static? iwctl.c:1049:5: warning: symbol 'iwctl_siwrts' was not declared. Should it be static? iwctl.c:1077:5: warning: symbol 'iwctl_giwrts' was not declared. Should it be static? iwctl.c:1096:5: warning: symbol 'iwctl_siwfrag' was not declared. Should it be static? iwctl.c:1123:5: warning: symbol 'iwctl_giwfrag' was not declared. Should it be static? iwctl.c:1141:5: warning: symbol 'iwctl_siwretry' was not declared. Should it be static? iwctl.c:1176:5: warning: symbol 'iwctl_giwretry' was not declared. Should it be static? iwctl.c:1205:5: warning: symbol 'iwctl_siwencode' was not declared. Should it be static? iwctl.c:1336:5: warning: symbol 'iwctl_giwencode' was not declared. Should it be static? iwctl.c:1398:5: warning: symbol 'iwctl_siwpower' was not declared. Should it be static? iwctl.c:1448:5: warning: symbol 'iwctl_giwpower' was not declared. Should it be static? iwctl.c:1478:5: warning: symbol 'iwctl_giwsens' was not declared. Should it be static? iwctl.c:1502:5: warning: symbol 'iwctl_siwauth' was not declared. Should it be static? iwctl.c:1603:5: warning: symbol 'iwctl_giwauth' was not declared. Should it be static? iwctl.c:1611:5: warning: symbol 'iwctl_siwgenie' was not declared. Should it be static? iwctl.c:1644:5: warning: symbol 'iwctl_giwgenie' was not declared. Should it be static? iwctl.c:1669:5: warning: symbol 'iwctl_siwencodeext' was not declared. Should it be static? iwctl.c:1783:5: warning: symbol 'iwctl_giwencodeext' was not declared. Should it be static? iwctl.c:1791:5: warning: symbol 'iwctl_siwmlme' was not declared. Should it be static? iwctl.c:1900:21: warning: symbol 'iwctl_private_args' was not declared. Should it be static? iwctl.c:1906:33: warning: symbol 'iwctl_handler_def' was not declared. Should it be static?

---
 drivers/staging/vt6655/iwctl.c |    1 +
 1 file changed, 1 insertion(+)
drivers/staging/vt6655/iwctl.c +1 -0
index ae2b87f..ba50d7f 100644
@@ -33,6 +33,7 @@
 #include "device.h"
 #include "ioctl.h"
 #include "iocmd.h"
+#include "iwctl.h"
 #include "mac.h"
 #include "card.h"
 #include "hostap.h"
Signature · 1 line
1.7.9.5
maintainer
#3 lore raw
In reply to James A Shackleford
Quoted 21 lines · James A Shackleford

The function iwctl_siwscan() is defined in iwctl.c as:
int iwctl_siwscan(struct net_device *dev,
struct iw_request_info *info, struct iw_point *wrq,
char *extra)
{
...

This patch updates iwctl.h so that the type of the 3rd parameter (*wqr) in the function declaration matches the definition.

---
 drivers/staging/vt6655/iwctl.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/iwctl.h +0 -0
index 871bd7c..4ad5e48 100644

drivers/staging/vt6655/iwctl.h int iwctl_giwscan(struct net_device *dev, · line 173

Quoted 7 lines
drivers/staging/vt6655/iwctl.h +1 -1
@@ -168,7 +168,7 @@ int iwctl_giwscan(struct net_device *dev,
 
 int iwctl_siwscan(struct net_device *dev,
 		  struct iw_request_info *info,
-		  struct iw_param *wrq,
+		  struct iw_point *wrq,
 		  char *extra);
 

Why isn't the compiler catching this issue? Should something include this .h file?

thanks,

greg k-h

#4 lore raw
Quoted 33 lines · Greg KH
Quoted 21 lines · James A Shackleford

The function iwctl_siwscan() is defined in iwctl.c as:
int iwctl_siwscan(struct net_device *dev,
struct iw_request_info *info, struct iw_point *wrq,
char *extra)
{
...

This patch updates iwctl.h so that the type of the 3rd parameter (*wqr) in the function declaration matches the definition.

---
 drivers/staging/vt6655/iwctl.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/iwctl.h +0 -0
index 871bd7c..4ad5e48 100644

drivers/staging/vt6655/iwctl.h int iwctl_giwscan(struct net_device *dev, · line 173

Quoted 7 lines
drivers/staging/vt6655/iwctl.h +1 -1
@@ -168,7 +168,7 @@ int iwctl_giwscan(struct net_device *dev,
 
 int iwctl_siwscan(struct net_device *dev,
 		  struct iw_request_info *info,
-		  struct iw_param *wrq,
+		  struct iw_point *wrq,
 		  char *extra);
 

Why isn't the compiler catching this issue? Should something include this .h file?

Quoted 3 lines

thanks,

greg k-h

The declaration for iwctl_siwscan(), along with quite a few other declarations, should be removed from this header and their functions made static within iwctl.c I will put another patch together that further cleans this up.

-James