All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: wlan-ng: fix Missing a blank line after declarations warnings
@ 2014-06-13 14:58 Cheng-Wei Lee
  2014-06-13 17:15 ` Greg Kroah-Hartman
  2014-06-16  8:02 ` Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Cheng-Wei Lee @ 2014-06-13 14:58 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sherif Shehab Aldin, Avinash Kumar,
	Peter Senna Tschudin
  Cc: devel, linux-kernel

Signed-off-by: Quentin Lee <lee.rhapsody@gmail.com>
---
 drivers/staging/wlan-ng/hfa384x_usb.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c
b/drivers/staging/wlan-ng/hfa384x_usb.c
index 98343ff7..b87cd6b 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -3533,7 +3533,6 @@ static void hfa384x_usbin_rx(wlandevice_t
*wlandev, struct sk_buff *skb)
 	}

 done:
-	return;
 }

 /*----------------------------------------------------------------
@@ -3643,8 +3642,6 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,

 	/* pass it back up */
 	prism2sta_ev_rx(wlandev, skb);
-
-	return;
 }

 /*----------------------------------------------------------------
@@ -3705,6 +3702,7 @@ static void hfa384x_usbout_callback(struct urb *urb)
 		case -EPIPE:
 			{
 				hfa384x_t *hw = wlandev->priv;
+
 				netdev_warn(hw->wlandev->netdev,
 					    "%s tx pipe stalled: requesting reset\n",
 					    wlandev->netdev->name);
-- 
1.7.9.5

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

* Re: [PATCH] staging: wlan-ng: fix Missing a blank line after declarations warnings
  2014-06-13 14:58 [PATCH] staging: wlan-ng: fix Missing a blank line after declarations warnings Cheng-Wei Lee
@ 2014-06-13 17:15 ` Greg Kroah-Hartman
  2014-06-13 17:37   ` Joe Perches
  2014-06-16  8:02 ` Dan Carpenter
  1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-13 17:15 UTC (permalink / raw)
  To: Cheng-Wei Lee
  Cc: Sherif Shehab Aldin, Avinash Kumar, Peter Senna Tschudin, devel,
	linux-kernel

On Fri, Jun 13, 2014 at 10:58:14PM +0800, Cheng-Wei Lee wrote:
> Signed-off-by: Quentin Lee <lee.rhapsody@gmail.com>
> ---
>  drivers/staging/wlan-ng/hfa384x_usb.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c
> b/drivers/staging/wlan-ng/hfa384x_usb.c
> index 98343ff7..b87cd6b 100644
> --- a/drivers/staging/wlan-ng/hfa384x_usb.c
> +++ b/drivers/staging/wlan-ng/hfa384x_usb.c
> @@ -3533,7 +3533,6 @@ static void hfa384x_usbin_rx(wlandevice_t
> *wlandev, struct sk_buff *skb)
>  	}
> 
>  done:
> -	return;
>  }

That's a good thing to do, but it is not what you said you did up above
in the changelog entry.

Please make up 2 patches here, one to remove the unneeded return; lines,
and one to fix up the whitespace of variables.

thanks,

greg k-h

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

* Re: [PATCH] staging: wlan-ng: fix Missing a blank line after declarations warnings
  2014-06-13 17:15 ` Greg Kroah-Hartman
@ 2014-06-13 17:37   ` Joe Perches
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2014-06-13 17:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Cheng-Wei Lee, Sherif Shehab Aldin, Avinash Kumar,
	Peter Senna Tschudin, devel, linux-kernel

On Fri, 2014-06-13 at 10:15 -0700, Greg Kroah-Hartman wrote:
> On Fri, Jun 13, 2014 at 10:58:14PM +0800, Cheng-Wei Lee wrote:
> > Signed-off-by: Quentin Lee <lee.rhapsody@gmail.com>
[]
> > diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c
[]
> > @@ -3533,7 +3533,6 @@ static void hfa384x_usbin_rx(wlandevice_t
> > *wlandev, struct sk_buff *skb)
> >  	}
> > 
> >  done:
> > -	return;
> >  }
> 
> That's a good thing to do, but it is not what you said you did up above
> in the changelog entry.

I don't believe it's a good thing to do at all.
I suspect more that this wasn't compile tested.

This doesn't compile for at least several
supported gcc versions. 

gcc doesn't (didn't? I haven't tried 4.9) like:

label:
}

to terminate a function definition.

$ cat label_test.c
void func(void)
{
	goto label;
label:
}
$

with gcc 4.8:

$ gcc label_test.c
label_test.c: In function ‘func’:
label_test.c:5:1: error: label at end of compound statement
 label:
 ^

whereas this compiles fine:

$ cat label_test2.c
void func(void)
{
	goto label;
label:
	;
}
$


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

* Re: [PATCH] staging: wlan-ng: fix Missing a blank line after declarations warnings
  2014-06-13 14:58 [PATCH] staging: wlan-ng: fix Missing a blank line after declarations warnings Cheng-Wei Lee
  2014-06-13 17:15 ` Greg Kroah-Hartman
@ 2014-06-16  8:02 ` Dan Carpenter
  1 sibling, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2014-06-16  8:02 UTC (permalink / raw)
  To: Cheng-Wei Lee
  Cc: Greg Kroah-Hartman, Sherif Shehab Aldin, Avinash Kumar,
	Peter Senna Tschudin, devel, linux-kernel

Wrong description, doesn't apply, and breaks the build.

regards,
dan carpenter


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

end of thread, other threads:[~2014-06-16  8:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-13 14:58 [PATCH] staging: wlan-ng: fix Missing a blank line after declarations warnings Cheng-Wei Lee
2014-06-13 17:15 ` Greg Kroah-Hartman
2014-06-13 17:37   ` Joe Perches
2014-06-16  8:02 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.