Skip to content

Commit

Permalink
Staging: otus: dont mix declarations and code
Browse files Browse the repository at this point in the history
$ 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>
  • Loading branch information
horms@vergenet.net authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 90d49b4 commit d027936
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/staging/otus/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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);

Expand All @@ -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:
Expand Down

0 comments on commit d027936

Please sign in to comment.