public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL][PATCH 1/1] Fix warning in staging/otus/ioctl.c
@ 2009-06-08  7:19 Pranith Kumar
  2009-06-08  8:08 ` Pranith Kumar
  0 siblings, 1 reply; 15+ messages in thread
From: Pranith Kumar @ 2009-06-08  7:19 UTC (permalink / raw)
  To: greg; +Cc: linux-kernel

Hi,

This patch fixes the following warning

drivers/staging/otus/ioctl.c: In function `usbdrv_wpa_ioctl':
drivers/staging/otus/ioctl.c:2269: warning: ISO C90 forbids mixed
declarations and code
drivers/staging/otus/ioctl.c: In function `usbdrv_ioctl':
drivers/staging/otus/ioctl.c:2448: warning: ISO C90 forbids mixed
declarations and code

Thanks,
--
Pranith.

Signed-off-by: D Pranith Kumar <bobby.prani@gmail.com>

diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c
index ce04218..5e8bd94 100644
--- a/drivers/staging/otus/ioctl.c
+++ b/drivers/staging/otus/ioctl.c
@@ -2045,6 +2045,7 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm)
 	struct zsKeyInfo keyInfo;
 	struct usbdrv_private *macp = dev->ml_priv;
 	u16_t vapId = 0;
+   int ii;
 
 	/* zmw_get_wlan_dev(dev); */
 
@@ -2168,7 +2169,6 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm)
 		/* DUMP key context */
 		/* #ifdef WPA_DEBUG */
 		if (keyInfo.keyLength > 0) {
-			int ii;
 			printk(KERN_WARNING
 						"Otus: Key Context:\n");
 			for (ii = 0; ii < keyInfo.keyLength; ) {
@@ -2266,7 +2266,6 @@ 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);
 		*/
-		int ii;
 		u8_t len = zdparm->u.generic_elem.len;
 		u8_t *wpaie = (u8_t *)zdparm->u.generic_elem.data;
 
@@ -2401,7 +2400,7 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 	struct athr_wlan_param zdparm;
 	struct usbdrv_private *macp = dev->ml_priv;
 
-	int err = 0;
+	int err = 0, val = 0;
 	int changed = 0;
 
 	/* regp = macp->regp; */
@@ -2445,7 +2444,7 @@ int usbdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 			err = -EPERM;
 			break;
 		}
-		int val = *((int *) wrq->u.name);
+       val = *((int *) wrq->u.name);
 		if ((val < 0) || (val > 2)) {
 			err = -EINVAL;
 			break;

^ permalink raw reply related	[flat|nested] 15+ messages in thread
* [TRIVIAL][PATCH 1/1] Fix warning in staging/otus/ioctl.c
@ 2009-05-29  7:54 Pranith Kumar
  2009-06-02 21:47 ` Greg KH
  0 siblings, 1 reply; 15+ messages in thread
From: Pranith Kumar @ 2009-05-29  7:54 UTC (permalink / raw)
  To: Greg KH; +Cc: LKML

Hi Greg,

This patch fixes the following warning

drivers/staging/otus/ioctl.c: In function `usbdrv_wpa_ioctl':
drivers/staging/otus/ioctl.c:2269: warning: ISO C90 forbids mixed
declarations and code
drivers/staging/otus/ioctl.c: In function `usbdrv_ioctl':
drivers/staging/otus/ioctl.c:2448: warning: ISO C90 forbids mixed
declarations and code

Thanks,
-- 
Pranith.

Signed-off-by: D Pranith Kumar <bobby.prani@gmail.com>

diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c
index ce04218..26bd999 100644
--- a/drivers/staging/otus/ioctl.c
+++ b/drivers/staging/otus/ioctl.c
@@ -2045,6 +2045,7 @@ int usbdrv_wpa_ioctl(struct net_device *dev,
struct athr_wlan_param *zdparm)
        struct zsKeyInfo keyInfo;
        struct usbdrv_private *macp = dev->ml_priv;
        u16_t vapId = 0;
+    int ii;

        /* zmw_get_wlan_dev(dev); */

@@ -2168,7 +2169,6 @@ int usbdrv_wpa_ioctl(struct net_device *dev,
struct athr_wlan_param *zdparm)
                /* DUMP key context */
                /* #ifdef WPA_DEBUG */
                if (keyInfo.keyLength > 0) {
-                       int ii;
                        printk(KERN_WARNING
                                                "Otus: Key Context:\n");
                        for (ii = 0; ii < keyInfo.keyLength; ) {
@@ -2266,7 +2266,6 @@ 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);
                */
-               int ii;
                u8_t len = zdparm->u.generic_elem.len;
                u8_t *wpaie = (u8_t *)zdparm->u.generic_elem.data;

@@ -2401,7 +2400,7 @@ int usbdrv_ioctl(struct net_device *dev, struct
ifreq *ifr, int cmd)
        struct athr_wlan_param zdparm;
        struct usbdrv_private *macp = dev->ml_priv;

-       int err = 0;
+       int err = 0, val = 0;
        int changed = 0;

        /* regp = macp->regp; */
@@ -2445,7 +2444,7 @@ int usbdrv_ioctl(struct net_device *dev, struct
ifreq *ifr, int cmd)
                        err = -EPERM;
                        break;
                }
-               int val = *((int *) wrq->u.name);
+               val = *((int *) wrq->u.name);
                if ((val < 0) || (val > 2)) {
                        err = -EINVAL;
                        break;

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-06-08 18:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-08  7:19 [TRIVIAL][PATCH 1/1] Fix warning in staging/otus/ioctl.c Pranith Kumar
2009-06-08  8:08 ` Pranith Kumar
2009-06-08  9:09   ` Stefan Richter
2009-06-08 10:02     ` Pranith Kumar
2009-06-08 18:01       ` Stefan Richter
2009-06-08 18:18         ` Stefan Richter
  -- strict thread matches above, loose matches on Subject: below --
2009-05-29  7:54 Pranith Kumar
2009-06-02 21:47 ` Greg KH
2009-06-03  6:49   ` Pranith Kumar
2009-06-03 15:21     ` Greg KH
2009-06-04  5:53       ` Pranith Kumar
2009-06-04 17:56         ` Greg KH
2009-06-05  5:10           ` Pranith Kumar
2009-06-05  6:15             ` Pranith Kumar
2009-06-04 18:37         ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox