2009-06-02 22:17:54

by Greg KH

[permalink] [raw]
Subject: Re: [TRIVIAL][PATCH 1/1] Fix warning in staging/otus/ioctl.c

On Fri, May 29, 2009 at 01:24:16PM +0530, Pranith Kumar wrote:
> 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 <[email protected]>
>
> 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;

Your patch is line-wrapped and the tabs seem to be stripped out, making
it impossible to apply :(

care to try again?

thanks,

greg k-h


2009-06-03 06:49:31

by Pranith Kumar

[permalink] [raw]
Subject: Re: [TRIVIAL][PATCH 1/1] Fix warning in staging/otus/ioctl.c

On 6/3/09, Greg KH <[email protected]> wrote:
> On Fri, May 29, 2009 at 01:24:16PM +0530, Pranith Kumar wrote:
>> 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
>>

> Your patch is line-wrapped and the tabs seem to be stripped out, making
> it impossible to apply :(
>
> care to try again?
>

Hi Greg,

I am using Gmail, which does this. I haven't figured out how to
configure this thing yet.

Please accept the patch as attachment.

Thanks,
Pranith


Attachments:
staging_patch.diff (1.89 kB)

2009-06-03 15:28:29

by Greg KH

[permalink] [raw]
Subject: Re: [TRIVIAL][PATCH 1/1] Fix warning in staging/otus/ioctl.c

On Wed, Jun 03, 2009 at 12:19:26PM +0530, Pranith Kumar wrote:
> I am using Gmail, which does this. I haven't figured out how to
> configure this thing yet.

Please try reading Documentation/email-clients.txt and try again.

> Please accept the patch as attachment.

Sorry, my tools do not like patches as mime attachments :(

Care to resolve your email issues so that you can send patches properly?

thanks,

greg k-h

2009-06-04 06:27:19

by Pranith Kumar

[permalink] [raw]
Subject: Re: [TRIVIAL][PATCH 1/1] Fix warning in staging/otus/ioctl.c

Greg KH wrote:
> On Wed, Jun 03, 2009 at 12:19:26PM +0530, Pranith Kumar wrote:
>
>> I am using Gmail, which does this. I haven't figured out how to
>> configure this thing yet.
>>
>
> Please try reading Documentation/email-clients.txt and try again.
>
>

Ok, I've configured my email client now. Resubmitting patch.

Signed-off-by: D Pranith Kumar <[email protected]>

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;

2009-06-04 18:14:31

by Greg KH

[permalink] [raw]
Subject: Re: [TRIVIAL][PATCH 1/1] Fix warning in staging/otus/ioctl.c

On Thu, Jun 04, 2009 at 11:23:48AM +0530, Pranith Kumar wrote:
> Greg KH wrote:
> > On Wed, Jun 03, 2009 at 12:19:26PM +0530, Pranith Kumar wrote:
> >
> >> I am using Gmail, which does this. I haven't figured out how to
> >> configure this thing yet.
> >>
> >
> > Please try reading Documentation/email-clients.txt and try again.
> >
> >
>
> Ok, I've configured my email client now. Resubmitting patch.
>
> Signed-off-by: D Pranith Kumar <[email protected]>
>
> 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;

Nope, the patch is linewrapped and the whitespace is still messed up :(

Care to retry?

thanks,

greg k-h

2009-06-04 18:37:46

by Miguel Ojeda

[permalink] [raw]
Subject: Re: [TRIVIAL][PATCH 1/1] Fix warning in staging/otus/ioctl.c

On Thu, Jun 4, 2009 at 7:53 AM, Pranith Kumar <[email protected]> wrote:
> Greg KH wrote:
>>
>> On Wed, Jun 03, 2009 at 12:19:26PM +0530, Pranith Kumar wrote:
>>
>>>
>>> I am using Gmail, which does this. I haven't figured out how to
>>> configure this thing yet.
>>>
>>
>> Please try reading Documentation/email-clients.txt and try again.
>>
>>
>
> Ok, I've configured my email client now. Resubmitting patch.
>

Here is a tip: Submit the patch to yourself first, then use the
GMail's option "See original" and check if your patch is linewrapped.
After being sure that your patch is not linewrapped, send it to LKML.

That is what I did while finding a decent email client : )

PS: Do not forget to repeat the process every time you configure a new
email client!

2009-06-05 05:10:36

by Pranith Kumar

[permalink] [raw]
Subject: Re: [TRIVIAL][PATCH 1/1] Fix warning in staging/otus/ioctl.c

Greg KH wrote:
> On Thu, Jun 04, 2009 at 11:23:48AM +0530, Pranith Kumar wrote:
>
>> Greg KH wrote:
>>
>>> On Wed, Jun 03, 2009 at 12:19:26PM +0530, Pranith Kumar wrote:
>>>
>>>
>>>> I am using Gmail, which does this. I haven't figured out how to
>>>> configure this thing yet.
>>>>
>>>>
>>>
> Nope, the patch is linewrapped and the whitespace is still messed up :(
>
> Care to retry?
>
>
Ok, checked this with checkpatch.pl and it shows no errors. Fingers crossed.

Signed-off-by: D Pranith Kumar <[email protected]>

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;

2009-06-05 06:16:28

by Pranith Kumar

[permalink] [raw]
Subject: Re: [TRIVIAL][PATCH 1/1] Fix warning in staging/otus/ioctl.c

Pranith Kumar wrote:
> Greg KH wrote:
>> On Thu, Jun 04, 2009 at 11:23:48AM +0530, Pranith Kumar wrote:
>> Nope, the patch is linewrapped and the whitespace is still messed up :(
>>
>> Care to retry?
>>
>>
> +++ b/drivers/staging/otus/ioctl.c
> @@ -2045,6 +2045,7 @@ int usbdrv_wpa_ioctl(struct net_device *dev,
> struct athr_wlan_param *zdparm)

just verified on lkml, still line wrapped. Please drop this patch.

Thanks,
Pranith