* [PATCH 2/2] staging: vt6656: Remove useless function
@ 2011-12-20 1:07 Marcos Paulo de Souza
2011-12-20 6:37 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Marcos Paulo de Souza @ 2011-12-20 1:07 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Marcos Paulo de Souza
This patch removes a useless function, because its just return a 0
value.
Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
---
drivers/staging/vt6656/iwctl.c | 18 +-----------------
1 files changed, 1 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index 2121205..9dc5757 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -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
--
1.7.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] staging: vt6656: Remove useless function
2011-12-20 1:07 [PATCH 2/2] staging: vt6656: Remove useless function Marcos Paulo de Souza
@ 2011-12-20 6:37 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2011-12-20 6:37 UTC (permalink / raw)
To: Marcos Paulo de Souza; +Cc: gregkh, devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1157 bytes --]
On Tue, Dec 20, 2011 at 01:07:27AM +0000, Marcos Paulo de Souza wrote:
> /*
> * 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
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.
> (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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-20 6:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20 1:07 [PATCH 2/2] staging: vt6656: Remove useless function Marcos Paulo de Souza
2011-12-20 6:37 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).