]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: wlan-ng: Drop void pointer cast
authorJanani Ravichandran <janani.rvchndrn@gmail.com>
Thu, 25 Feb 2016 19:13:24 +0000 (14:13 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
Void pointers need not be cast to other pointer types.
Semantic patch used:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x) [...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/prism2mib.c

index e1b2e47aae9b8662ad4af2c8197729d53e431907..5f3c7ea8ee4bdd3997f4197dac12e1f719f6d8bc 100644 (file)
@@ -379,7 +379,7 @@ static int prism2mib_bytearea2pstr(struct mibrec *mib,
                                   void *data)
 {
        int result;
-       p80211pstrd_t *pstr = (p80211pstrd_t *) data;
+       p80211pstrd_t *pstr = data;
        u8 bytebuf[MIB_TMP_MAXLEN];
 
        if (isget) {