linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: rtl8712: Fixed brace and comment style issue
@ 2016-07-03  3:54 Anuradha Weeraman
  2016-07-08 18:24 ` Luis de Bethencourt
  0 siblings, 1 reply; 3+ messages in thread
From: Anuradha Weeraman @ 2016-07-03  3:54 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh
  Cc: devel, linux-kernel, Anuradha Weeraman

Fixed issues with coding style.

Signed-off-by: Anuradha Weeraman <anuradha@weeraman.com>
---
 drivers/staging/rtl8712/xmit_linux.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c
index 695f9b9..1e86133 100644
--- a/drivers/staging/rtl8712/xmit_linux.c
+++ b/drivers/staging/rtl8712/xmit_linux.c
@@ -91,7 +91,8 @@ void r8712_set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
 	} else {
 		/* "When priority processing of data frames is supported,
 		 * a STA's SME should send EAPOL-Key frames at the highest
-		 * priority." */
+		 * priority."
+		 */
 
 		if (pattrib->ether_type == 0x888e)
 			UserPriority = 7;
@@ -162,16 +163,16 @@ int r8712_xmit_entry(_pkt *pkt, struct  net_device *pnetdev)
 	struct _adapter *padapter = netdev_priv(pnetdev);
 	struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
 
-	if (!r8712_if_up(padapter)) {
+	if (!r8712_if_up(padapter))
 		goto _xmit_entry_drop;
-	}
+
 	pxmitframe = r8712_alloc_xmitframe(pxmitpriv);
-	if (!pxmitframe) {
+	if (!pxmitframe)
 		goto _xmit_entry_drop;
-	}
-	if ((!r8712_update_attrib(padapter, pkt, &pxmitframe->attrib))) {
+
+	if ((!r8712_update_attrib(padapter, pkt, &pxmitframe->attrib)))
 		goto _xmit_entry_drop;
-	}
+
 	padapter->ledpriv.LedControlHandler(padapter, LED_CTL_TX);
 	pxmitframe->pkt = pkt;
 	if (r8712_pre_xmit(padapter, pxmitframe)) {
-- 
2.9.0

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

* Re: [PATCH] Staging: rtl8712: Fixed brace and comment style issue
  2016-07-03  3:54 [PATCH] Staging: rtl8712: Fixed brace and comment style issue Anuradha Weeraman
@ 2016-07-08 18:24 ` Luis de Bethencourt
  0 siblings, 0 replies; 3+ messages in thread
From: Luis de Bethencourt @ 2016-07-08 18:24 UTC (permalink / raw)
  To: Anuradha Weeraman, Larry.Finger, florian.c.schilhabel, gregkh
  Cc: devel, linux-kernel

On 03/07/16 04:54, Anuradha Weeraman wrote:
> Fixed issues with coding style.
> 
> Signed-off-by: Anuradha Weeraman <anuradha@weeraman.com>
> ---
>  drivers/staging/rtl8712/xmit_linux.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c
> index 695f9b9..1e86133 100644
> --- a/drivers/staging/rtl8712/xmit_linux.c
> +++ b/drivers/staging/rtl8712/xmit_linux.c
> @@ -91,7 +91,8 @@ void r8712_set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
>  	} else {
>  		/* "When priority processing of data frames is supported,
>  		 * a STA's SME should send EAPOL-Key frames at the highest
> -		 * priority." */
> +		 * priority."
> +		 */
>  
>  		if (pattrib->ether_type == 0x888e)
>  			UserPriority = 7;
> @@ -162,16 +163,16 @@ int r8712_xmit_entry(_pkt *pkt, struct  net_device *pnetdev)
>  	struct _adapter *padapter = netdev_priv(pnetdev);
>  	struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
>  
> -	if (!r8712_if_up(padapter)) {
> +	if (!r8712_if_up(padapter))
>  		goto _xmit_entry_drop;
> -	}
> +
>  	pxmitframe = r8712_alloc_xmitframe(pxmitpriv);
> -	if (!pxmitframe) {
> +	if (!pxmitframe)
>  		goto _xmit_entry_drop;
> -	}
> -	if ((!r8712_update_attrib(padapter, pkt, &pxmitframe->attrib))) {
> +
> +	if ((!r8712_update_attrib(padapter, pkt, &pxmitframe->attrib)))
>  		goto _xmit_entry_drop;
> -	}
> +
>  	padapter->ledpriv.LedControlHandler(padapter, LED_CTL_TX);
>  	pxmitframe->pkt = pkt;
>  	if (r8712_pre_xmit(padapter, pxmitframe)) {
> 

Patch applies cleanly and removes the checkpatch issues related to
unnecessary braces and trailing */ in a different line.

Hi Anuradha,

It is a good idea to include the checkpatch issue you are solving in
the commit message, in this case it would be:

Fixed issues with coding style

WARNING: Block comments use a trailing */ on a separate line
#94: FILE: drivers/staging/rtl8712/xmit_linux.c:94:
+                * priority." */

WARNING: braces {} are not necessary for single statement blocks
#165: FILE: drivers/staging/rtl8712/xmit_linux.c:165:
+       if (!r8712_if_up(padapter)) {
+               goto _xmit_entry_drop;
+       }
---

You can send each type of checkpatch issue in an separate patch. If
you do this, please fix the other issues as well :) There are some
CamelCase problems and the GPL header needs fixing.

Thanks 
Luis

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

* [PATCH] Staging: rtl8712: Fixed brace and comment style issue
@ 2016-06-27  7:37 Anuradha Weeraman
  0 siblings, 0 replies; 3+ messages in thread
From: Anuradha Weeraman @ 2016-06-27  7:37 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Anuradha Weeraman

Fixed issues with coding style.

Signed-off-by: Anuradha Weeraman <anuradha@weeraman.com>
---
 drivers/staging/rtl8712/xmit_linux.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c
index 695f9b9..1e86133 100644
--- a/drivers/staging/rtl8712/xmit_linux.c
+++ b/drivers/staging/rtl8712/xmit_linux.c
@@ -91,7 +91,8 @@ void r8712_set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
 	} else {
 		/* "When priority processing of data frames is supported,
 		 * a STA's SME should send EAPOL-Key frames at the highest
-		 * priority." */
+		 * priority."
+		 */
 
 		if (pattrib->ether_type == 0x888e)
 			UserPriority = 7;
@@ -162,16 +163,16 @@ int r8712_xmit_entry(_pkt *pkt, struct  net_device *pnetdev)
 	struct _adapter *padapter = netdev_priv(pnetdev);
 	struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
 
-	if (!r8712_if_up(padapter)) {
+	if (!r8712_if_up(padapter))
 		goto _xmit_entry_drop;
-	}
+
 	pxmitframe = r8712_alloc_xmitframe(pxmitpriv);
-	if (!pxmitframe) {
+	if (!pxmitframe)
 		goto _xmit_entry_drop;
-	}
-	if ((!r8712_update_attrib(padapter, pkt, &pxmitframe->attrib))) {
+
+	if ((!r8712_update_attrib(padapter, pkt, &pxmitframe->attrib)))
 		goto _xmit_entry_drop;
-	}
+
 	padapter->ledpriv.LedControlHandler(padapter, LED_CTL_TX);
 	pxmitframe->pkt = pkt;
 	if (r8712_pre_xmit(padapter, pxmitframe)) {
-- 
2.9.0

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

end of thread, other threads:[~2016-07-08 18:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-03  3:54 [PATCH] Staging: rtl8712: Fixed brace and comment style issue Anuradha Weeraman
2016-07-08 18:24 ` Luis de Bethencourt
  -- strict thread matches above, loose matches on Subject: below --
2016-06-27  7:37 Anuradha Weeraman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).