Staging: otus: dont mix declarations and code
authorhorms@vergenet.net <horms@vergenet.net>
Fri, 8 Jan 2010 07:57:49 +0000 (18:57 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 4 Mar 2010 00:42:41 +0000 (16:42 -0800)
$ gcc (Debian 4.4.2-8) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make
...
drivers/staging/otus/ioctl.c: In function 'usbdrv_wpa_ioctl':
drivers/staging/otus/ioctl.c:2253: warning: ISO C90 forbids mixed declarations and code
...

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/otus/ioctl.c

index 86d9333..ebaedb7 100644 (file)
@@ -2227,7 +2227,8 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm)
        case ZD_CMD_SCAN_REQ:
                printk(KERN_ERR "usbdrv_wpa_ioctl: ZD_CMD_SCAN_REQ\n");
                break;
-       case ZD_CMD_SET_GENERIC_ELEMENT:
+       case ZD_CMD_SET_GENERIC_ELEMENT: {
+               u8_t len, *wpaie;
                printk(KERN_ERR "usbdrv_wpa_ioctl:"
                                        " ZD_CMD_SET_GENERIC_ELEMENT\n");
 
@@ -2250,8 +2251,8 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm)
                /* zfiWlanSetWpaIe(dev, zdparm->u.generic_elem.data,
                * zdparm->u.generic_elem.len);
                */
-               u8_t len = zdparm->u.generic_elem.len;
-               u8_t *wpaie = (u8_t *)zdparm->u.generic_elem.data;
+               len = zdparm->u.generic_elem.len;
+               wpaie = zdparm->u.generic_elem.data;
 
                printk(KERN_ERR "wd->ap.wpaLen : % d\n", len);
 
@@ -2273,6 +2274,7 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm)
                * #endif
                */
                break;
+       }
 
        /* #ifdef ZM_HOSTAPD_SUPPORT */
        case ZD_CMD_GET_TSC: