Staging: wlags49_h2: Fix incorrect type in assignment in wl_wext.c
authorMonam Agarwal <monamagarwal123@gmail.com>
Wed, 5 Mar 2014 21:05:16 +0000 (02:35 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 22:54:15 +0000 (14:54 -0800)
This patch fixes following sparse warnings:
drivers/staging/wlags49_h2/wl_wext.c:3357:28: warning: incorrect type in assignment (different address spaces)
drivers/staging/wlags49_h2/wl_wext.c:3357:28:    expected void [noderef] <asn:1>*[addressable] [assigned] pointer
drivers/staging/wlags49_h2/wl_wext.c:3357:28:    got void *<noident>
drivers/staging/wlags49_h2/wl_wext.c:3422:47: warning: incorrect type in assignment (different address spaces)
drivers/staging/wlags49_h2/wl_wext.c:3422:47:    expected void [noderef] <asn:1>*[addressable] [assigned] pointer
drivers/staging/wlags49_h2/wl_wext.c:3422:47:    got char *[usertype] <noident>
drivers/staging/wlags49_h2/wl_wext.c:3781:21: warning: symbol 'wl_priv_args' was not declared. Should it be static?

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlags49_h2/wl_wext.c

index 187fc060de26bc732a434790c159b2274a83ebfc..404fda18eb81f9eeeef3bef2f723ad0e7a492533 100644 (file)
@@ -3354,7 +3354,7 @@ void wl_wext_event_essid( struct net_device *dev )
           the call to wireless_send_event() must also point to where the ESSID
           lives */
        wrqu.essid.length  = strlen( lp->NetworkName );
-       wrqu.essid.pointer = (caddr_t)lp->NetworkName;
+       wrqu.essid.pointer = (void __user *)lp->NetworkName;
        wrqu.essid.flags   = 1;
 
        wireless_send_event( dev, SIOCSIWESSID, &wrqu, lp->NetworkName );
@@ -3419,7 +3419,7 @@ void wl_wext_event_encode( struct net_device *dev )
 
                /* Only provide the key if permissions allow */
                if( capable( CAP_NET_ADMIN )) {
-                       wrqu.encoding.pointer = (caddr_t)lp->DefaultKeys.key[index].key;
+                       wrqu.encoding.pointer = (void __user *)lp->DefaultKeys.key[index].key;
                        wrqu.encoding.length  = lp->DefaultKeys.key[index].len;
                } else {
                        wrqu.encoding.flags |= IW_ENCODE_NOKEY;