Skip to contentSkip to conversation

staging: vt6656: Remove useless function

PATCH In review Marcos Paulo de Souza 2 participants 2 messages Dec 20, 2011 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 staging: vt6656: Remove useless function

This patch removes a useless function, because its just return a 0 value.

---
 drivers/staging/vt6656/iwctl.c |   18 +-----------------
 1 files changed, 1 insertions(+), 17 deletions(-)
drivers/staging/vt6656/iwctl.c +1 -17
index 2121205..9dc5757 100644
@@ -100,21 +100,6 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev)
 	return &pDevice->wstats;
 }
 
-
-
-/*------------------------------------------------------------------*/
-
-
-static int iwctl_commit(struct net_device *dev,
-			      struct iw_request_info *info,
-			      void *wrq,
-			      char *extra)
-{
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWCOMMIT\n");
-
-	return 0;
-}
-
 /*
  * Wireless Handler : get protocol name
  */
@@ -1936,7 +1921,6 @@ int iwctl_siwmlme(struct net_device *dev,
 /*
 static const iw_handler		iwctl_handler[] =
 {
-	(iw_handler) iwctl_commit,      // SIOCSIWCOMMIT
 	(iw_handler) iwctl_giwname,     // SIOCGIWNAME
 	(iw_handler) NULL,				// SIOCSIWNWID
 	(iw_handler) NULL,				// SIOCGIWNWID
@@ -1998,7 +1982,7 @@ static const iw_handler		iwctl_handler[] =
 
 static const iw_handler		iwctl_handler[] =
 {
-	(iw_handler) iwctl_commit,      // SIOCSIWCOMMIT
+	(iw_handler) 0,      /* SIOCSIWCOMMIT */
 	(iw_handler) NULL,      // SIOCGIWNAME
 	(iw_handler) NULL,				// SIOCSIWNWID
 	(iw_handler) NULL,				// SIOCGIWNWID
Signature · 1 line
1.7.4.4
#1 lore raw

drivers/staging/vt6656/iwctl.c int iwctl_siwmlme(struct net_device *dev, · line 1939

Quoted 8 lines · Marcos Paulo de Souza

/*
* Wireless Handler : get protocol name
*/

drivers/staging/vt6656/iwctl.c +0 -1
@@ -1936,7 +1921,6 @@ int iwctl_siwmlme(struct net_device *dev,
 /*
 static const iw_handler		iwctl_handler[] =
 {
-	(iw_handler) iwctl_commit,      // SIOCSIWCOMMIT

Nope. This doesn't work. It moves everything in the array to the wrong position. It should be replaced with NULL or better yet, the whole array should be rewritten with like:

static const iw_handler iwctl_handler[] = {
[SIOCGIWNAME] = (iw_handler) iwctl_giwname, [SIOCGIWRANGE] = (iw_handler) iwctl_giwrange,
...

The NULLs could be left out then.

drivers/staging/vt6656/iwctl.c static const iw_handler iwctl_handler[] = · line 1985

Quoted 9 lines
drivers/staging/vt6656/iwctl.c +1 -1
 	(iw_handler) iwctl_giwname,     // SIOCGIWNAME
 	(iw_handler) NULL,				// SIOCSIWNWID
 	(iw_handler) NULL,				// SIOCGIWNWID
@@ -1998,7 +1982,7 @@ static const iw_handler		iwctl_handler[] =
 
 static const iw_handler		iwctl_handler[] =
 {
-	(iw_handler) iwctl_commit,      // SIOCSIWCOMMIT
+	(iw_handler) 0,      /* SIOCSIWCOMMIT */

This should be NULL not zero because it's a pointer. (Style issue, not a bug).

regards,
dan carpenter