All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix  various warnings and checks in rtw_recv.c.
@ 2019-03-16 13:33 Sanjana Sanikommu
  2019-03-16 13:35 ` [PATCH 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
                   ` (13 more replies)
  0 siblings, 14 replies; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 13:33 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

This series fix the following warning: 
fix a tab indent issue.

This series fix the following checks.
fix a paranthesis issue
fix a space issue

Changes in v2:
Fix the patch series number

Sanjana (3):
  Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
  Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue
  Staging: rtl8188eu: rtw_recv.c: fix a space issue

 drivers/staging/rtl8188eu/core/rtw_recv.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

-- 
2.17.1



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

* [PATCH 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
@ 2019-03-16 13:35 ` Sanjana Sanikommu
  2019-03-16 13:37 ` [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue Sanjana Sanikommu
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 13:35 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel, Sanjana

From: Sanjana <sanjana99reddy99@gmail.com>

Fix a tab indent issue which removed warnings after compilation using
checkpatch.pl.

[WARNING]:No extra space at the beginning of a line.

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 1d83affc08ce..0d04057e6cf6 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -24,11 +24,11 @@ static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3};
 
 /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
 static u8 rtw_bridge_tunnel_header[] = {
-       0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
+	0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
 };
 
 static u8 rtw_rfc1042_header[] = {
-       0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
+	0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
 };
 
 static void rtw_signal_stat_timer_hdl(struct timer_list *t);
-- 
2.17.1



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

* [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
  2019-03-16 13:35 ` [PATCH 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
@ 2019-03-16 13:37 ` Sanjana Sanikommu
  2019-03-16 13:38   ` [PATCH 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
  2019-03-16 13:49   ` [Outreachy kernel] [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue Julia Lawall
  2019-03-16 15:22 ` [PATCH v2 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
                   ` (11 subsequent siblings)
  13 siblings, 2 replies; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 13:37 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel, Sanjana

From: Sanjana <sanjana99reddy99@gmail.com>

This patch fixes the checkpatch.pl CHECK in rtw_recv.c file:

CHECK: Unnecessary paranthesis around prframe->list

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 0d04057e6cf6..fc72e797f8e5 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -64,9 +64,9 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
 	precvframe = PTR_ALIGN(precvpriv->pallocated_frame_buf, RXFRAME_ALIGN_SZ);
 
 	for (i = 0; i < NR_RECVFRAME; i++) {
-		INIT_LIST_HEAD(&(precvframe->list));
+		INIT_LIST_HEAD(&precvframe->list);
 
-		list_add_tail(&(precvframe->list),
+		list_add_tail(&precvframe->list,
 				     &(precvpriv->free_recv_queue.queue));
 
 		precvframe->pkt = NULL;
@@ -1336,7 +1336,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
 	plist = phead->next;
 	pfhdr = list_entry(plist, struct recv_frame, list);
 	prframe = pfhdr;
-	list_del_init(&(prframe->list));
+	list_del_init(&prframe->list);
 
 	if (curfragnum != pfhdr->attrib.frag_num) {
 		/* the first fragment number must be 0 */
@@ -1663,9 +1663,9 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
 			break;
 	}
 
-	list_del_init(&(prframe->list));
+	list_del_init(&prframe->list);
 
-	list_add_tail(&(prframe->list), plist);
+	list_add_tail(&prframe->list), plist;
 	return true;
 }
 
@@ -1704,7 +1704,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
 				 ("%s: indicate=%d seq=%d amsdu=%d\n",
 				  __func__, preorder_ctrl->indicate_seq, pattrib->seq_num, pattrib->amsdu));
 			plist = plist->next;
-			list_del_init(&(prframe->list));
+			list_del_init(&prframe->list);
 
 			if (SN_EQUAL(preorder_ctrl->indicate_seq, pattrib->seq_num))
 				preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;
-- 
2.17.1



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

* [PATCH 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue
  2019-03-16 13:37 ` [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue Sanjana Sanikommu
@ 2019-03-16 13:38   ` Sanjana Sanikommu
  2019-03-16 13:49   ` [Outreachy kernel] [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue Julia Lawall
  1 sibling, 0 replies; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 13:38 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel, Sanjana

From: Sanjana <sanjana99reddy99@gmail.com>

This patch fixes the checkpatch.pl CHECK in rtw_recv.c file:

CHECK: spaces preferred around '%' (ctx:VxV)

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index fc72e797f8e5..f4b418cac1db 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -1763,7 +1763,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
 			preorder_ctrl->indicate_seq = pattrib->seq_num;
 			rtw_recv_indicatepkt(padapter, prframe);
 
-			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
+			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
 			return _SUCCESS;
 		}
 	} else if (pattrib->amsdu == 1) { /* temp filter -> means didn't support A-MSDUs in a A-MPDU */
@@ -1771,7 +1771,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
 			preorder_ctrl->indicate_seq = pattrib->seq_num;
 			retval = amsdu_to_msdu(padapter, prframe);
 
-			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
+			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
 			return retval;
 		}
 	}
-- 
2.17.1



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

* Re: [Outreachy kernel] [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue
  2019-03-16 13:37 ` [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue Sanjana Sanikommu
  2019-03-16 13:38   ` [PATCH 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
@ 2019-03-16 13:49   ` Julia Lawall
       [not found]     ` <a3fb8066-35c9-4437-a698-702363bd39bc@googlegroups.com>
  1 sibling, 1 reply; 26+ messages in thread
From: Julia Lawall @ 2019-03-16 13:49 UTC (permalink / raw)
  To: Sanjana Sanikommu; +Cc: gregkh, outreachy-kernel



On Sat, 16 Mar 2019, Sanjana Sanikommu wrote:

> From: Sanjana <sanjana99reddy99@gmail.com>

The normal "From" line on your message is fine.  The goal is that there
should be a From line that is the same as the Signed-off-by line.  You
already have that, so there is no need to put another one, which in this
case is not the same as your Signed-off-by line.

In the subject line and in the message: paranthesis -> parenthesis.

> This patch fixes the checkpatch.pl CHECK in rtw_recv.c file:

The log message should not start with "This patch",  It should start with
an imperative verb.  That would be Fix, in your case.

Try to write a message that explains what you did and why, rather than
just saying that you fixed a warning.  How did you fix it?  Why is it
useful to fix it?

julia

>
> CHECK: Unnecessary paranthesis around prframe->list
>
> Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
> ---
>  drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
> index 0d04057e6cf6..fc72e797f8e5 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_recv.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
> @@ -64,9 +64,9 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
>  	precvframe = PTR_ALIGN(precvpriv->pallocated_frame_buf, RXFRAME_ALIGN_SZ);
>
>  	for (i = 0; i < NR_RECVFRAME; i++) {
> -		INIT_LIST_HEAD(&(precvframe->list));
> +		INIT_LIST_HEAD(&precvframe->list);
>
> -		list_add_tail(&(precvframe->list),
> +		list_add_tail(&precvframe->list,
>  				     &(precvpriv->free_recv_queue.queue));
>
>  		precvframe->pkt = NULL;
> @@ -1336,7 +1336,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
>  	plist = phead->next;
>  	pfhdr = list_entry(plist, struct recv_frame, list);
>  	prframe = pfhdr;
> -	list_del_init(&(prframe->list));
> +	list_del_init(&prframe->list);
>
>  	if (curfragnum != pfhdr->attrib.frag_num) {
>  		/* the first fragment number must be 0 */
> @@ -1663,9 +1663,9 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
>  			break;
>  	}
>
> -	list_del_init(&(prframe->list));
> +	list_del_init(&prframe->list);
>
> -	list_add_tail(&(prframe->list), plist);
> +	list_add_tail(&prframe->list), plist;
>  	return true;
>  }
>
> @@ -1704,7 +1704,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
>  				 ("%s: indicate=%d seq=%d amsdu=%d\n",
>  				  __func__, preorder_ctrl->indicate_seq, pattrib->seq_num, pattrib->amsdu));
>  			plist = plist->next;
> -			list_del_init(&(prframe->list));
> +			list_del_init(&prframe->list);
>
>  			if (SN_EQUAL(preorder_ctrl->indicate_seq, pattrib->seq_num))
>  				preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190316133711.8968-1-sanjana99reddy99%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

* [PATCH v2 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
  2019-03-16 13:35 ` [PATCH 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
  2019-03-16 13:37 ` [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue Sanjana Sanikommu
@ 2019-03-16 15:22 ` Sanjana Sanikommu
  2019-03-16 16:43   ` [Outreachy kernel] " Julia Lawall
  2019-03-16 16:25 ` [PATCH v2 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis -> parenthesis issue Sanjana Sanikommu
                   ` (10 subsequent siblings)
  13 siblings, 1 reply; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 15:22 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

Fix a tab indent issue which removed warnings after compilation using
checkpatch.pl.

[WARNING]:No extra space at the beginning of a line.

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 1d83affc08ce..0d04057e6cf6 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -24,11 +24,11 @@ static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3};
 
 /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
 static u8 rtw_bridge_tunnel_header[] = {
-       0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
+	0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
 };
 
 static u8 rtw_rfc1042_header[] = {
-       0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
+	0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
 };
 
 static void rtw_signal_stat_timer_hdl(struct timer_list *t);
-- 
2.17.1



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

* [PATCH v2 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis -> parenthesis issue.
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (2 preceding siblings ...)
  2019-03-16 15:22 ` [PATCH v2 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
@ 2019-03-16 16:25 ` Sanjana Sanikommu
  2019-03-16 16:42   ` [Outreachy kernel] " Julia Lawall
  2019-03-16 16:29 ` [PATCH v2 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
                   ` (9 subsequent siblings)
  13 siblings, 1 reply; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 16:25 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

Fix a paranthesis -> parenthesis issue which removed check after compiled using
checkpatch.pl

CHECK: Remove unnecessary paranthesis -> paranthesis.

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 0d04057e6cf6..fc72e797f8e5 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -64,9 +64,9 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
 	precvframe = PTR_ALIGN(precvpriv->pallocated_frame_buf, RXFRAME_ALIGN_SZ);
 
 	for (i = 0; i < NR_RECVFRAME; i++) {
-		INIT_LIST_HEAD(&(precvframe->list));
+		INIT_LIST_HEAD(&precvframe->list);
 
-		list_add_tail(&(precvframe->list),
+		list_add_tail(&precvframe->list,
 				     &(precvpriv->free_recv_queue.queue));
 
 		precvframe->pkt = NULL;
@@ -1336,7 +1336,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
 	plist = phead->next;
 	pfhdr = list_entry(plist, struct recv_frame, list);
 	prframe = pfhdr;
-	list_del_init(&(prframe->list));
+	list_del_init(&prframe->list);
 
 	if (curfragnum != pfhdr->attrib.frag_num) {
 		/* the first fragment number must be 0 */
@@ -1663,9 +1663,9 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
 			break;
 	}
 
-	list_del_init(&(prframe->list));
+	list_del_init(&prframe->list);
 
-	list_add_tail(&(prframe->list), plist);
+	list_add_tail(&prframe->list), plist;
 	return true;
 }
 
@@ -1704,7 +1704,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
 				 ("%s: indicate=%d seq=%d amsdu=%d\n",
 				  __func__, preorder_ctrl->indicate_seq, pattrib->seq_num, pattrib->amsdu));
 			plist = plist->next;
-			list_del_init(&(prframe->list));
+			list_del_init(&prframe->list);
 
 			if (SN_EQUAL(preorder_ctrl->indicate_seq, pattrib->seq_num))
 				preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;
-- 
2.17.1



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

* [PATCH v2 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (3 preceding siblings ...)
  2019-03-16 16:25 ` [PATCH v2 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis -> parenthesis issue Sanjana Sanikommu
@ 2019-03-16 16:29 ` Sanjana Sanikommu
  2019-03-16 16:40   ` [Outreachy kernel] " Julia Lawall
  2019-03-16 19:24 ` [PATCH v3 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 16:29 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

Fix a space issue which removed checks after compilation using
checkpatch.pl.

CHECK: spaces preferred around '%' (ctx:VxV)
CHECK: spaces preferred around '-' (ctx:VxV)
CHECK: spaces preferred around '&' (ctx:VxV)

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_recv.c | 24 +++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index fc72e797f8e5..1d3e011a732a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -253,7 +253,7 @@ static int recvframe_chkmic(struct adapter *adapter,
 
 			/* icv_len included the mic code */
 			datalen = precvframe->pkt->len-prxattrib->hdrlen -
-				  prxattrib->iv_len-prxattrib->icv_len-8;
+				  prxattrib->iv_len - prxattrib->icv_len-8;
 			pframe = precvframe->pkt->data;
 			payload = pframe+prxattrib->hdrlen+prxattrib->iv_len;
 
@@ -277,14 +277,14 @@ static int recvframe_chkmic(struct adapter *adapter,
 			if (bmic_err) {
 				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
 					 ("\n *(pframemic-8)-*(pframemic-1)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
-					 *(pframemic-8), *(pframemic-7), *(pframemic-6),
-					 *(pframemic-5), *(pframemic-4), *(pframemic-3),
-					 *(pframemic-2), *(pframemic-1)));
+					 *(pframemic - 8), *(pframemic - 7), *(pframemic - 6),
+					 *(pframemic - 5), *(pframemic - 4), *(pframemic - 3),
+					 *(pframemic - 2), *(pframemic - 1)));
 				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
 					 ("\n *(pframemic-16)-*(pframemic-9)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
-					 *(pframemic-16), *(pframemic-15), *(pframemic-14),
-					 *(pframemic-13), *(pframemic-12), *(pframemic-11),
-					 *(pframemic-10), *(pframemic-9)));
+					 *(pframemic - 16), *(pframemic - 15), *(pframemic - 14),
+					 *(pframemic - 13), *(pframemic - 12), *(pframemic - 11),
+					 *(pframemic - 10), *(pframemic - 9)));
 				{
 					uint i;
 
@@ -367,7 +367,7 @@ static struct recv_frame *decryptor(struct adapter *padapter,
 	if (prxattrib->encrypt > 0) {
 		u8 *iv = precv_frame->pkt->data+prxattrib->hdrlen;
 
-		prxattrib->key_index = (((iv[3])>>6)&0x3);
+		prxattrib->key_index = (((iv[3])>>6) & 0x3);
 
 		if (prxattrib->key_index > WEP_KEYS) {
 			DBG_88E("prxattrib->key_index(%d)>WEP_KEYS\n", prxattrib->key_index);
@@ -496,7 +496,7 @@ static int recv_decache(struct recv_frame *precv_frame, u8 bretry,
 {
 	int tid = precv_frame->attrib.priority;
 
-	u16 seq_ctrl = ((precv_frame->attrib.seq_num&0xffff) << 4) |
+	u16 seq_ctrl = ((precv_frame->attrib.seq_num & 0xffff) << 4) |
 		(precv_frame->attrib.frag_num & 0xf);
 
 	if (tid > 15) {
@@ -564,7 +564,7 @@ static void process_wmmps_data(struct adapter *padapter,
 	if (!(psta->qos_info&0xf))
 		return;
 
-	if (psta->state&WIFI_SLEEP_STATE) {
+	if (psta->state & WIFI_SLEEP_STATE) {
 		u8 wmmps_ac = 0;
 
 		switch (pattrib->priority) {
@@ -1763,7 +1763,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
 			preorder_ctrl->indicate_seq = pattrib->seq_num;
 			rtw_recv_indicatepkt(padapter, prframe);
 
-			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
+			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
 			return _SUCCESS;
 		}
 	} else if (pattrib->amsdu == 1) { /* temp filter -> means didn't support A-MSDUs in a A-MPDU */
@@ -1771,7 +1771,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
 			preorder_ctrl->indicate_seq = pattrib->seq_num;
 			retval = amsdu_to_msdu(padapter, prframe);
 
-			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
+			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
 			return retval;
 		}
 	}
-- 
2.17.1



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

* Re: [Outreachy kernel] [PATCH v2 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue
  2019-03-16 16:29 ` [PATCH v2 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
@ 2019-03-16 16:40   ` Julia Lawall
  0 siblings, 0 replies; 26+ messages in thread
From: Julia Lawall @ 2019-03-16 16:40 UTC (permalink / raw)
  To: Sanjana Sanikommu; +Cc: gregkh, outreachy-kernel



On Sat, 16 Mar 2019, Sanjana Sanikommu wrote:

> Fix a space issue which removed checks after compilation using
> checkpatch.pl.

I don't understand "removed checks after compilation".

>
> CHECK: spaces preferred around '%' (ctx:VxV)
> CHECK: spaces preferred around '-' (ctx:VxV)
> CHECK: spaces preferred around '&' (ctx:VxV)
>
> Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
> ---
>  drivers/staging/rtl8188eu/core/rtw_recv.c | 24 +++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
> index fc72e797f8e5..1d3e011a732a 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_recv.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
> @@ -253,7 +253,7 @@ static int recvframe_chkmic(struct adapter *adapter,
>
>  			/* icv_len included the mic code */
>  			datalen = precvframe->pkt->len-prxattrib->hdrlen -
> -				  prxattrib->iv_len-prxattrib->icv_len-8;
> +				  prxattrib->iv_len - prxattrib->icv_len-8;

There are two occurrences of - on this line.

>  			pframe = precvframe->pkt->data;
>  			payload = pframe+prxattrib->hdrlen+prxattrib->iv_len;
>
> @@ -277,14 +277,14 @@ static int recvframe_chkmic(struct adapter *adapter,
>  			if (bmic_err) {
>  				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
>  					 ("\n *(pframemic-8)-*(pframemic-1)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
> -					 *(pframemic-8), *(pframemic-7), *(pframemic-6),
> -					 *(pframemic-5), *(pframemic-4), *(pframemic-3),
> -					 *(pframemic-2), *(pframemic-1)));
> +					 *(pframemic - 8), *(pframemic - 7), *(pframemic - 6),
> +					 *(pframemic - 5), *(pframemic - 4), *(pframemic - 3),
> +					 *(pframemic - 2), *(pframemic - 1)));
>  				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
>  					 ("\n *(pframemic-16)-*(pframemic-9)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
> -					 *(pframemic-16), *(pframemic-15), *(pframemic-14),
> -					 *(pframemic-13), *(pframemic-12), *(pframemic-11),
> -					 *(pframemic-10), *(pframemic-9)));
> +					 *(pframemic - 16), *(pframemic - 15), *(pframemic - 14),
> +					 *(pframemic - 13), *(pframemic - 12), *(pframemic - 11),
> +					 *(pframemic - 10), *(pframemic - 9)));

This makes the overflow of 80 characters even worse.  Add some newlines to
solve the problem.

>  				{
>  					uint i;
>
> @@ -367,7 +367,7 @@ static struct recv_frame *decryptor(struct adapter *padapter,
>  	if (prxattrib->encrypt > 0) {
>  		u8 *iv = precv_frame->pkt->data+prxattrib->hdrlen;
>
> -		prxattrib->key_index = (((iv[3])>>6)&0x3);
> +		prxattrib->key_index = (((iv[3])>>6) & 0x3);

There should be spaces around the >> as well.

julia

>
>  		if (prxattrib->key_index > WEP_KEYS) {
>  			DBG_88E("prxattrib->key_index(%d)>WEP_KEYS\n", prxattrib->key_index);
> @@ -496,7 +496,7 @@ static int recv_decache(struct recv_frame *precv_frame, u8 bretry,
>  {
>  	int tid = precv_frame->attrib.priority;
>
> -	u16 seq_ctrl = ((precv_frame->attrib.seq_num&0xffff) << 4) |
> +	u16 seq_ctrl = ((precv_frame->attrib.seq_num & 0xffff) << 4) |
>  		(precv_frame->attrib.frag_num & 0xf);
>
>  	if (tid > 15) {
> @@ -564,7 +564,7 @@ static void process_wmmps_data(struct adapter *padapter,
>  	if (!(psta->qos_info&0xf))
>  		return;
>
> -	if (psta->state&WIFI_SLEEP_STATE) {
> +	if (psta->state & WIFI_SLEEP_STATE) {
>  		u8 wmmps_ac = 0;
>
>  		switch (pattrib->priority) {
> @@ -1763,7 +1763,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
>  			preorder_ctrl->indicate_seq = pattrib->seq_num;
>  			rtw_recv_indicatepkt(padapter, prframe);
>
> -			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
> +			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
>  			return _SUCCESS;
>  		}
>  	} else if (pattrib->amsdu == 1) { /* temp filter -> means didn't support A-MSDUs in a A-MPDU */
> @@ -1771,7 +1771,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
>  			preorder_ctrl->indicate_seq = pattrib->seq_num;
>  			retval = amsdu_to_msdu(padapter, prframe);
>
> -			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
> +			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
>  			return retval;
>  		}
>  	}
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190316162913.19144-1-sanjana99reddy99%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

* Re: [Outreachy kernel] [PATCH v2 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis -> parenthesis issue.
  2019-03-16 16:25 ` [PATCH v2 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis -> parenthesis issue Sanjana Sanikommu
@ 2019-03-16 16:42   ` Julia Lawall
  0 siblings, 0 replies; 26+ messages in thread
From: Julia Lawall @ 2019-03-16 16:42 UTC (permalink / raw)
  To: Sanjana Sanikommu; +Cc: gregkh, outreachy-kernel



On Sat, 16 Mar 2019, Sanjana Sanikommu wrote:

> Fix a paranthesis -> parenthesis issue which removed check after compiled using
> checkpatch.pl

I don't understand the log message.  The suggestion paranthesis ->
parenthesis was a spelling fix.

julia

>
> CHECK: Remove unnecessary paranthesis -> paranthesis.
>
> Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
> ---
>  drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
> index 0d04057e6cf6..fc72e797f8e5 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_recv.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
> @@ -64,9 +64,9 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
>  	precvframe = PTR_ALIGN(precvpriv->pallocated_frame_buf, RXFRAME_ALIGN_SZ);
>
>  	for (i = 0; i < NR_RECVFRAME; i++) {
> -		INIT_LIST_HEAD(&(precvframe->list));
> +		INIT_LIST_HEAD(&precvframe->list);
>
> -		list_add_tail(&(precvframe->list),
> +		list_add_tail(&precvframe->list,
>  				     &(precvpriv->free_recv_queue.queue));
>
>  		precvframe->pkt = NULL;
> @@ -1336,7 +1336,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
>  	plist = phead->next;
>  	pfhdr = list_entry(plist, struct recv_frame, list);
>  	prframe = pfhdr;
> -	list_del_init(&(prframe->list));
> +	list_del_init(&prframe->list);
>
>  	if (curfragnum != pfhdr->attrib.frag_num) {
>  		/* the first fragment number must be 0 */
> @@ -1663,9 +1663,9 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
>  			break;
>  	}
>
> -	list_del_init(&(prframe->list));
> +	list_del_init(&prframe->list);
>
> -	list_add_tail(&(prframe->list), plist);
> +	list_add_tail(&prframe->list), plist;
>  	return true;
>  }
>
> @@ -1704,7 +1704,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
>  				 ("%s: indicate=%d seq=%d amsdu=%d\n",
>  				  __func__, preorder_ctrl->indicate_seq, pattrib->seq_num, pattrib->amsdu));
>  			plist = plist->next;
> -			list_del_init(&(prframe->list));
> +			list_del_init(&prframe->list);
>
>  			if (SN_EQUAL(preorder_ctrl->indicate_seq, pattrib->seq_num))
>  				preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190316162549.19083-1-sanjana99reddy99%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

* Re: [Outreachy kernel] [PATCH v2 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
  2019-03-16 15:22 ` [PATCH v2 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
@ 2019-03-16 16:43   ` Julia Lawall
  0 siblings, 0 replies; 26+ messages in thread
From: Julia Lawall @ 2019-03-16 16:43 UTC (permalink / raw)
  To: Sanjana Sanikommu; +Cc: gregkh, outreachy-kernel



On Sat, 16 Mar 2019, Sanjana Sanikommu wrote:

> Fix a tab indent issue which removed warnings after compilation using
> checkpatch.pl.
>
> [WARNING]:No extra space at the beginning of a line.
>
> Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
> ---

For a v2, you have to describe what has changed here, or if nothing has
changed, say that nothing has changed.

julia


>  drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
> index 1d83affc08ce..0d04057e6cf6 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_recv.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
> @@ -24,11 +24,11 @@ static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3};
>
>  /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
>  static u8 rtw_bridge_tunnel_header[] = {
> -       0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
> +	0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
>  };
>
>  static u8 rtw_rfc1042_header[] = {
> -       0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
> +	0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
>  };
>
>  static void rtw_signal_stat_timer_hdl(struct timer_list *t);
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190316152245.18268-1-sanjana99reddy99%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

* Re: [Outreachy kernel] [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue
       [not found]     ` <a3fb8066-35c9-4437-a698-702363bd39bc@googlegroups.com>
@ 2019-03-16 17:00       ` Julia Lawall
  0 siblings, 0 replies; 26+ messages in thread
From: Julia Lawall @ 2019-03-16 17:00 UTC (permalink / raw)
  To: sanjanasanikommu; +Cc: outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]



On Sat, 16 Mar 2019, sanjanasanikommu@gmail.com wrote:

>
>
>       Yeah, I would change them.
>
>
>
> 1.Also, umknowingly I commited a mistake by not mentioning the version of
> series.
>
> 2. I will reedit the patches and send them gain i.e 
> PATCH[2/3]
> PATCH[3/3]

That would be [PATCH 2/3], etc

> 3.I am confused what should be my version number for patch 1,2,3 after
> changes.
> Is it v2 or v3?

Pick a number that is bigger than what you have used before.

julia

> Plz let me know...
>
> thank you
>
> sanjana 
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/a3fb8066-35c9-4437-a698-
> 702363bd39bc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

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

* [PATCH v3 0/3] Staging: rtl8188eu: rtw_recv.c: fix  various warnings and checks in rtw_recv.c.
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (4 preceding siblings ...)
  2019-03-16 16:29 ` [PATCH v2 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
@ 2019-03-16 19:24 ` Sanjana Sanikommu
  2019-03-16 19:25 ` [PATCH v3 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 19:24 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

This series fix the following warning: 
fix a tab indent issue.

This series fix the following checks.
fix a paranthesis issue around ->
fix a space issue
Changes in v3:
Change the log message from the [PATCH v2 1/3]
Change the subject line from the [PATCH v2 2/3]
Change the log message from the [PATCH v2 2/3]
fix a overflow of 80 characters from the [PATCH v2 3/3]
fix a space issue around '>>' from the [PATCH v3 3/3]
fix a space issue around  '-' from the [PATCH v3 3/3]

Changes in v2:
Remove "From" line from the [PATCH 1/3]
Remove "From" line from the [PATCH 2/3]
Remove "From" line from the [PATCH 3/3]
Change subject line in [PATCH 2/3]
Change subject line in [PATCH 3/3]
Change log message in [PATCH 2/3]
Change log message in [PATCH 3/3]
Sanjana (3):
  Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
  Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue
  Staging: rtl8188eu: rtw_recv.c: fix a space issue

 drivers/staging/rtl8188eu/core/rtw_recv.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

-- 
2.17.1



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

* [PATCH v3 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (5 preceding siblings ...)
  2019-03-16 19:24 ` [PATCH v3 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
@ 2019-03-16 19:25 ` Sanjana Sanikommu
  2019-03-16 19:29 ` [PATCH v3 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c Sanjana Sanikommu
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 19:25 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

Fix a tab indent issue.Issue found by checkpatch.pl semantic patch results for
rtw_recv.c.

[WARNING]:No extra space at the beginning of a line.

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
Changes in v3:
Change the log message from the [PATCH v2 1/3]

Changes in v2:
Remove "From" line from the [PATCH 1/3]

 drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 1d83affc08ce..0d04057e6cf6 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -24,11 +24,11 @@ static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3};
 
 /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
 static u8 rtw_bridge_tunnel_header[] = {
-       0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
+	0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
 };
 
 static u8 rtw_rfc1042_header[] = {
-       0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
+	0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
 };
 
 static void rtw_signal_stat_timer_hdl(struct timer_list *t);
-- 
2.17.1



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

* [PATCH v3 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (6 preceding siblings ...)
  2019-03-16 19:25 ` [PATCH v3 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
@ 2019-03-16 19:29 ` Sanjana Sanikommu
  2019-03-16 19:32 ` [PATCH 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 19:29 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

fix a parathesis issue around '->' .Issue found by checkpatch.pl semantic patch results for
rtw_recv.c

CHECK: Remove unnecessary paranthesis around pframe -> list

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
Changes in v3:
Change the subject line from the [PATCH v2 2/3]
Change the log message from the [PATCH v2 2/3]

Changes in v2:
Remove "From" line from the [PATCH 2/3]
Change subject line from [PATCH 2/3]
Change log message in [PATCH 2/3]

 drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 0d04057e6cf6..fc72e797f8e5 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -64,9 +64,9 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
 	precvframe = PTR_ALIGN(precvpriv->pallocated_frame_buf, RXFRAME_ALIGN_SZ);
 
 	for (i = 0; i < NR_RECVFRAME; i++) {
-		INIT_LIST_HEAD(&(precvframe->list));
+		INIT_LIST_HEAD(&precvframe->list);
 
-		list_add_tail(&(precvframe->list),
+		list_add_tail(&precvframe->list,
 				     &(precvpriv->free_recv_queue.queue));
 
 		precvframe->pkt = NULL;
@@ -1336,7 +1336,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
 	plist = phead->next;
 	pfhdr = list_entry(plist, struct recv_frame, list);
 	prframe = pfhdr;
-	list_del_init(&(prframe->list));
+	list_del_init(&prframe->list);
 
 	if (curfragnum != pfhdr->attrib.frag_num) {
 		/* the first fragment number must be 0 */
@@ -1663,9 +1663,9 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
 			break;
 	}
 
-	list_del_init(&(prframe->list));
+	list_del_init(&prframe->list);
 
-	list_add_tail(&(prframe->list), plist);
+	list_add_tail(&prframe->list), plist;
 	return true;
 }
 
@@ -1704,7 +1704,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
 				 ("%s: indicate=%d seq=%d amsdu=%d\n",
 				  __func__, preorder_ctrl->indicate_seq, pattrib->seq_num, pattrib->amsdu));
 			plist = plist->next;
-			list_del_init(&(prframe->list));
+			list_del_init(&prframe->list);
 
 			if (SN_EQUAL(preorder_ctrl->indicate_seq, pattrib->seq_num))
 				preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;
-- 
2.17.1



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

* [PATCH 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (7 preceding siblings ...)
  2019-03-16 19:29 ` [PATCH v3 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c Sanjana Sanikommu
@ 2019-03-16 19:32 ` Sanjana Sanikommu
  2019-03-16 19:41   ` [Outreachy kernel] " Julia Lawall
  2019-03-16 19:49 ` [PATCH v3 " Sanjana Sanikommu
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 19:32 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

fix a space issue around the below operators mentioned in CHECK.Issue found by checkpatch.pl semantic patch results for
rtw_recv.c..

CHECK: spaces preferred around '%' (ctx:VxV)
CHECK: spaces preferred around '-' (ctx:VxV)
CHECK: spaces preferred around '&' (ctx:VxV)
CHECK: spaces preferred around '+' (ctx:VxV)
CHECK: spaces preferred around '<<' (ctx:VxV)

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
Changes in v3:
fix a overflow of 80 characters which occurred due to fix a spaces around '-'
from the [PATCH v2 3/3]
fix a space issue around '>>' from the [PATCH v3 3/3]
fix a space issue around  '-' from the [PATCH v3 3/3]

Changes in v2:
Remove "From" line from the [PATCH 3/3]
Change subject line in [PATCH 3/3]
Change log message in [PATCH 3/3]

 drivers/staging/rtl8188eu/core/rtw_recv.c | 97 +++++++++++++----------
 1 file changed, 54 insertions(+), 43 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index fc72e797f8e5..d7620b89813f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -252,21 +252,22 @@ static int recvframe_chkmic(struct adapter *adapter,
 			}
 
 			/* icv_len included the mic code */
-			datalen = precvframe->pkt->len-prxattrib->hdrlen -
-				  prxattrib->iv_len-prxattrib->icv_len-8;
+			datalen = precvframe->pkt->len - prxattrib->hdrlen -
+				  prxattrib->iv_len - prxattrib->icv_len - 8;
 			pframe = precvframe->pkt->data;
-			payload = pframe+prxattrib->hdrlen+prxattrib->iv_len;
+			payload = pframe + prxattrib->hdrlen +
+				prxattrib->iv_len;
 
 			RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("\n prxattrib->iv_len=%d prxattrib->icv_len=%d\n", prxattrib->iv_len, prxattrib->icv_len));
 			rtw_seccalctkipmic(mickey, pframe, payload, datalen, &miccode[0],
 					   (unsigned char)prxattrib->priority); /* care the length of the data */
 
-			pframemic = payload+datalen;
+			pframemic = payload + datalen;
 
 			bmic_err = false;
 
 			for (i = 0; i < 8; i++) {
-				if (miccode[i] != *(pframemic+i)) {
+				if (miccode[i] != *(pframemic + i)) {
 					RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
 						 ("%s: miccode[%d](%02x)!=*(pframemic+%d)(%02x) ",
 						  __func__, i, miccode[i], i, *(pframemic + i)));
@@ -277,14 +278,24 @@ static int recvframe_chkmic(struct adapter *adapter,
 			if (bmic_err) {
 				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
 					 ("\n *(pframemic-8)-*(pframemic-1)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
-					 *(pframemic-8), *(pframemic-7), *(pframemic-6),
-					 *(pframemic-5), *(pframemic-4), *(pframemic-3),
-					 *(pframemic-2), *(pframemic-1)));
+					 *(pframemic - 8),
+					 *(pframemic - 7),
+					 *(pframemic - 6),
+					 *(pframemic - 5),
+					 *(pframemic - 4),
+					 *(pframemic - 3),
+					 *(pframemic - 2),
+					 *(pframemic - 1)));
 				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
 					 ("\n *(pframemic-16)-*(pframemic-9)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
-					 *(pframemic-16), *(pframemic-15), *(pframemic-14),
-					 *(pframemic-13), *(pframemic-12), *(pframemic-11),
-					 *(pframemic-10), *(pframemic-9)));
+					 *(pframemic - 16),
+					 *(pframemic - 15),
+					 *(pframemic - 14),
+					 *(pframemic - 13),
+					 *(pframemic - 12),
+					 *(pframemic - 11),
+					 *(pframemic - 10),
+					 *(pframemic - 9)));
 				{
 					uint i;
 
@@ -295,14 +306,14 @@ static int recvframe_chkmic(struct adapter *adapter,
 						RT_TRACE(_module_rtl871x_recv_c_,
 							 _drv_err_,
 							 ("0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x",
-							 *(precvframe->pkt->data+i),
-							 *(precvframe->pkt->data+i+1),
-							 *(precvframe->pkt->data+i+2),
-							 *(precvframe->pkt->data+i+3),
-							 *(precvframe->pkt->data+i+4),
-							 *(precvframe->pkt->data+i+5),
-							 *(precvframe->pkt->data+i+6),
-							 *(precvframe->pkt->data+i+7)));
+							 *(precvframe->pkt->data + i),
+							 *(precvframe->pkt->data + i + 1),
+							 *(precvframe->pkt->data + i + 2),
+							 *(precvframe->pkt->data + i + 3),
+							 *(precvframe->pkt->data + i + 4),
+							 *(precvframe->pkt->data + i + 5),
+							 *(precvframe->pkt->data + i + 6),
+							 *(precvframe->pkt->data + i + 7)));
 					}
 					RT_TRACE(_module_rtl871x_recv_c_,
 						 _drv_err_,
@@ -365,9 +376,9 @@ static struct recv_frame *decryptor(struct adapter *padapter,
 	RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("prxstat->decrypted=%x prxattrib->encrypt=0x%03x\n", prxattrib->bdecrypted, prxattrib->encrypt));
 
 	if (prxattrib->encrypt > 0) {
-		u8 *iv = precv_frame->pkt->data+prxattrib->hdrlen;
+		u8 *iv = precv_frame->pkt->data + prxattrib->hdrlen;
 
-		prxattrib->key_index = (((iv[3])>>6)&0x3);
+		prxattrib->key_index = (((iv[3]) >> 6) & 0x3);
 
 		if (prxattrib->key_index > WEP_KEYS) {
 			DBG_88E("prxattrib->key_index(%d)>WEP_KEYS\n", prxattrib->key_index);
@@ -496,7 +507,7 @@ static int recv_decache(struct recv_frame *precv_frame, u8 bretry,
 {
 	int tid = precv_frame->attrib.priority;
 
-	u16 seq_ctrl = ((precv_frame->attrib.seq_num&0xffff) << 4) |
+	u16 seq_ctrl = ((precv_frame->attrib.seq_num & 0xffff) << 4) |
 		(precv_frame->attrib.frag_num & 0xf);
 
 	if (tid > 15) {
@@ -561,29 +572,29 @@ static void process_wmmps_data(struct adapter *padapter,
 	if (!psta->qos_option)
 		return;
 
-	if (!(psta->qos_info&0xf))
+	if (!(psta->qos_info & 0xf))
 		return;
 
-	if (psta->state&WIFI_SLEEP_STATE) {
+	if (psta->state & WIFI_SLEEP_STATE) {
 		u8 wmmps_ac = 0;
 
 		switch (pattrib->priority) {
 		case 1:
 		case 2:
-			wmmps_ac = psta->uapsd_bk&BIT(1);
+			wmmps_ac = psta->uapsd_bk & BIT(1);
 			break;
 		case 4:
 		case 5:
-			wmmps_ac = psta->uapsd_vi&BIT(1);
+			wmmps_ac = psta->uapsd_vi & BIT(1);
 			break;
 		case 6:
 		case 7:
-			wmmps_ac = psta->uapsd_vo&BIT(1);
+			wmmps_ac = psta->uapsd_vo & BIT(1);
 			break;
 		case 0:
 		case 3:
 		default:
-			wmmps_ac = psta->uapsd_be&BIT(1);
+			wmmps_ac = psta->uapsd_be & BIT(1);
 			break;
 		}
 
@@ -897,20 +908,20 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
 		switch (pattrib->priority) {
 		case 1:
 		case 2:
-			wmmps_ac = psta->uapsd_bk&BIT(0);
+			wmmps_ac = psta->uapsd_bk & BIT(0);
 			break;
 		case 4:
 		case 5:
-			wmmps_ac = psta->uapsd_vi&BIT(0);
+			wmmps_ac = psta->uapsd_vi & BIT(0);
 			break;
 		case 6:
 		case 7:
-			wmmps_ac = psta->uapsd_vo&BIT(0);
+			wmmps_ac = psta->uapsd_vo & BIT(0);
 			break;
 		case 0:
 		case 3:
 		default:
-			wmmps_ac = psta->uapsd_be&BIT(0);
+			wmmps_ac = psta->uapsd_be & BIT(0);
 			break;
 		}
 
@@ -923,7 +934,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
 			psta->state ^= WIFI_STA_ALIVE_CHK_STATE;
 		}
 
-		if ((psta->state&WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap&BIT(psta->aid))) {
+		if ((psta->state & WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap & BIT(psta->aid))) {
 			struct list_head *xmitframe_plist, *xmitframe_phead;
 			struct xmit_frame *pxmitframe = NULL;
 
@@ -961,7 +972,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
 					update_beacon(padapter, _TIM_IE_, NULL, false);
 				}
 			} else {
-				if (pstapriv->tim_bitmap&BIT(psta->aid)) {
+				if (pstapriv->tim_bitmap & BIT(psta->aid)) {
 					if (psta->sleepq_len == 0) {
 						DBG_88E("no buffered packets to xmit\n");
 
@@ -1160,7 +1171,7 @@ static int validate_recv_frame(struct adapter *adapter,
 	u8 bDumpRxPkt;
 	struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
 	u8 *ptr = precv_frame->pkt->data;
-	u8  ver = (unsigned char)(*ptr)&0x3;
+	u8  ver = (unsigned char)(*ptr) & 0x3;
 	struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
 
 	if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) {
@@ -1279,8 +1290,8 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
 	if (pattrib->encrypt)
 		skb_trim(precvframe->pkt, precvframe->pkt->len - pattrib->icv_len);
 
-	psnap = (struct ieee80211_snap_hdr *)(ptr+pattrib->hdrlen + pattrib->iv_len);
-	psnap_type = ptr+pattrib->hdrlen + pattrib->iv_len+SNAP_SIZE;
+	psnap = (struct ieee80211_snap_hdr *)(ptr + pattrib->hdrlen + pattrib->iv_len);
+	psnap_type = ptr + pattrib->hdrlen + pattrib->iv_len + SNAP_SIZE;
 	/* convert hdr + possible LLC headers into Ethernet header */
 	if ((!memcmp(psnap, rtw_rfc1042_header, SNAP_SIZE) &&
 	     memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) &&
@@ -1299,7 +1310,7 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
 	RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
 		 ("\n===pattrib->hdrlen: %x,  pattrib->iv_len:%x===\n\n", pattrib->hdrlen,  pattrib->iv_len));
 
-	memcpy(&be_tmp, ptr+rmv_len, 2);
+	memcpy(&be_tmp, ptr + rmv_len, 2);
 	eth_type = ntohs(be_tmp); /* pattrib->ether_type */
 	pattrib->eth_type = eth_type;
 
@@ -1308,11 +1319,11 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
 		return _FAIL;
 
 	memcpy(ptr, pattrib->dst, ETH_ALEN);
-	memcpy(ptr+ETH_ALEN, pattrib->src, ETH_ALEN);
+	memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN);
 
 	if (!bsnaphdr) {
 		be_tmp = htons(len);
-		memcpy(ptr+12, &be_tmp, 2);
+		memcpy(ptr + 12, &be_tmp, 2);
 	}
 
 	return _SUCCESS;
@@ -1560,7 +1571,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
 		pdata += nSubframe_Length;
 		a_len -= nSubframe_Length;
 		if (a_len != 0) {
-			padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & (4-1));
+			padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & (4 - 1));
 			if (padding_len == 4)
 				padding_len = 0;
 
@@ -1763,7 +1774,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
 			preorder_ctrl->indicate_seq = pattrib->seq_num;
 			rtw_recv_indicatepkt(padapter, prframe);
 
-			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
+			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
 			return _SUCCESS;
 		}
 	} else if (pattrib->amsdu == 1) { /* temp filter -> means didn't support A-MSDUs in a A-MPDU */
@@ -1771,7 +1782,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
 			preorder_ctrl->indicate_seq = pattrib->seq_num;
 			retval = amsdu_to_msdu(padapter, prframe);
 
-			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
+			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
 			return retval;
 		}
 	}
-- 
2.17.1



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

* Re: [Outreachy kernel] [PATCH 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue
  2019-03-16 19:32 ` [PATCH 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
@ 2019-03-16 19:41   ` Julia Lawall
  0 siblings, 0 replies; 26+ messages in thread
From: Julia Lawall @ 2019-03-16 19:41 UTC (permalink / raw)
  To: Sanjana Sanikommu; +Cc: gregkh, outreachy-kernel

You are missing the v3 in the subject line.

julia

On Sun, 17 Mar 2019, Sanjana Sanikommu wrote:

> fix a space issue around the below operators mentioned in CHECK.Issue found by checkpatch.pl semantic patch results for
> rtw_recv.c..
>
> CHECK: spaces preferred around '%' (ctx:VxV)
> CHECK: spaces preferred around '-' (ctx:VxV)
> CHECK: spaces preferred around '&' (ctx:VxV)
> CHECK: spaces preferred around '+' (ctx:VxV)
> CHECK: spaces preferred around '<<' (ctx:VxV)
>
> Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
> ---
> Changes in v3:
> fix a overflow of 80 characters which occurred due to fix a spaces around '-'
> from the [PATCH v2 3/3]
> fix a space issue around '>>' from the [PATCH v3 3/3]
> fix a space issue around  '-' from the [PATCH v3 3/3]
>
> Changes in v2:
> Remove "From" line from the [PATCH 3/3]
> Change subject line in [PATCH 3/3]
> Change log message in [PATCH 3/3]
>
>  drivers/staging/rtl8188eu/core/rtw_recv.c | 97 +++++++++++++----------
>  1 file changed, 54 insertions(+), 43 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
> index fc72e797f8e5..d7620b89813f 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_recv.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
> @@ -252,21 +252,22 @@ static int recvframe_chkmic(struct adapter *adapter,
>  			}
>
>  			/* icv_len included the mic code */
> -			datalen = precvframe->pkt->len-prxattrib->hdrlen -
> -				  prxattrib->iv_len-prxattrib->icv_len-8;
> +			datalen = precvframe->pkt->len - prxattrib->hdrlen -
> +				  prxattrib->iv_len - prxattrib->icv_len - 8;
>  			pframe = precvframe->pkt->data;
> -			payload = pframe+prxattrib->hdrlen+prxattrib->iv_len;
> +			payload = pframe + prxattrib->hdrlen +
> +				prxattrib->iv_len;
>
>  			RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("\n prxattrib->iv_len=%d prxattrib->icv_len=%d\n", prxattrib->iv_len, prxattrib->icv_len));
>  			rtw_seccalctkipmic(mickey, pframe, payload, datalen, &miccode[0],
>  					   (unsigned char)prxattrib->priority); /* care the length of the data */
>
> -			pframemic = payload+datalen;
> +			pframemic = payload + datalen;
>
>  			bmic_err = false;
>
>  			for (i = 0; i < 8; i++) {
> -				if (miccode[i] != *(pframemic+i)) {
> +				if (miccode[i] != *(pframemic + i)) {
>  					RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
>  						 ("%s: miccode[%d](%02x)!=*(pframemic+%d)(%02x) ",
>  						  __func__, i, miccode[i], i, *(pframemic + i)));
> @@ -277,14 +278,24 @@ static int recvframe_chkmic(struct adapter *adapter,
>  			if (bmic_err) {
>  				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
>  					 ("\n *(pframemic-8)-*(pframemic-1)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
> -					 *(pframemic-8), *(pframemic-7), *(pframemic-6),
> -					 *(pframemic-5), *(pframemic-4), *(pframemic-3),
> -					 *(pframemic-2), *(pframemic-1)));
> +					 *(pframemic - 8),
> +					 *(pframemic - 7),
> +					 *(pframemic - 6),
> +					 *(pframemic - 5),
> +					 *(pframemic - 4),
> +					 *(pframemic - 3),
> +					 *(pframemic - 2),
> +					 *(pframemic - 1)));
>  				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
>  					 ("\n *(pframemic-16)-*(pframemic-9)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
> -					 *(pframemic-16), *(pframemic-15), *(pframemic-14),
> -					 *(pframemic-13), *(pframemic-12), *(pframemic-11),
> -					 *(pframemic-10), *(pframemic-9)));
> +					 *(pframemic - 16),
> +					 *(pframemic - 15),
> +					 *(pframemic - 14),
> +					 *(pframemic - 13),
> +					 *(pframemic - 12),
> +					 *(pframemic - 11),
> +					 *(pframemic - 10),
> +					 *(pframemic - 9)));
>  				{
>  					uint i;
>
> @@ -295,14 +306,14 @@ static int recvframe_chkmic(struct adapter *adapter,
>  						RT_TRACE(_module_rtl871x_recv_c_,
>  							 _drv_err_,
>  							 ("0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x",
> -							 *(precvframe->pkt->data+i),
> -							 *(precvframe->pkt->data+i+1),
> -							 *(precvframe->pkt->data+i+2),
> -							 *(precvframe->pkt->data+i+3),
> -							 *(precvframe->pkt->data+i+4),
> -							 *(precvframe->pkt->data+i+5),
> -							 *(precvframe->pkt->data+i+6),
> -							 *(precvframe->pkt->data+i+7)));
> +							 *(precvframe->pkt->data + i),
> +							 *(precvframe->pkt->data + i + 1),
> +							 *(precvframe->pkt->data + i + 2),
> +							 *(precvframe->pkt->data + i + 3),
> +							 *(precvframe->pkt->data + i + 4),
> +							 *(precvframe->pkt->data + i + 5),
> +							 *(precvframe->pkt->data + i + 6),
> +							 *(precvframe->pkt->data + i + 7)));
>  					}
>  					RT_TRACE(_module_rtl871x_recv_c_,
>  						 _drv_err_,
> @@ -365,9 +376,9 @@ static struct recv_frame *decryptor(struct adapter *padapter,
>  	RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("prxstat->decrypted=%x prxattrib->encrypt=0x%03x\n", prxattrib->bdecrypted, prxattrib->encrypt));
>
>  	if (prxattrib->encrypt > 0) {
> -		u8 *iv = precv_frame->pkt->data+prxattrib->hdrlen;
> +		u8 *iv = precv_frame->pkt->data + prxattrib->hdrlen;
>
> -		prxattrib->key_index = (((iv[3])>>6)&0x3);
> +		prxattrib->key_index = (((iv[3]) >> 6) & 0x3);
>
>  		if (prxattrib->key_index > WEP_KEYS) {
>  			DBG_88E("prxattrib->key_index(%d)>WEP_KEYS\n", prxattrib->key_index);
> @@ -496,7 +507,7 @@ static int recv_decache(struct recv_frame *precv_frame, u8 bretry,
>  {
>  	int tid = precv_frame->attrib.priority;
>
> -	u16 seq_ctrl = ((precv_frame->attrib.seq_num&0xffff) << 4) |
> +	u16 seq_ctrl = ((precv_frame->attrib.seq_num & 0xffff) << 4) |
>  		(precv_frame->attrib.frag_num & 0xf);
>
>  	if (tid > 15) {
> @@ -561,29 +572,29 @@ static void process_wmmps_data(struct adapter *padapter,
>  	if (!psta->qos_option)
>  		return;
>
> -	if (!(psta->qos_info&0xf))
> +	if (!(psta->qos_info & 0xf))
>  		return;
>
> -	if (psta->state&WIFI_SLEEP_STATE) {
> +	if (psta->state & WIFI_SLEEP_STATE) {
>  		u8 wmmps_ac = 0;
>
>  		switch (pattrib->priority) {
>  		case 1:
>  		case 2:
> -			wmmps_ac = psta->uapsd_bk&BIT(1);
> +			wmmps_ac = psta->uapsd_bk & BIT(1);
>  			break;
>  		case 4:
>  		case 5:
> -			wmmps_ac = psta->uapsd_vi&BIT(1);
> +			wmmps_ac = psta->uapsd_vi & BIT(1);
>  			break;
>  		case 6:
>  		case 7:
> -			wmmps_ac = psta->uapsd_vo&BIT(1);
> +			wmmps_ac = psta->uapsd_vo & BIT(1);
>  			break;
>  		case 0:
>  		case 3:
>  		default:
> -			wmmps_ac = psta->uapsd_be&BIT(1);
> +			wmmps_ac = psta->uapsd_be & BIT(1);
>  			break;
>  		}
>
> @@ -897,20 +908,20 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
>  		switch (pattrib->priority) {
>  		case 1:
>  		case 2:
> -			wmmps_ac = psta->uapsd_bk&BIT(0);
> +			wmmps_ac = psta->uapsd_bk & BIT(0);
>  			break;
>  		case 4:
>  		case 5:
> -			wmmps_ac = psta->uapsd_vi&BIT(0);
> +			wmmps_ac = psta->uapsd_vi & BIT(0);
>  			break;
>  		case 6:
>  		case 7:
> -			wmmps_ac = psta->uapsd_vo&BIT(0);
> +			wmmps_ac = psta->uapsd_vo & BIT(0);
>  			break;
>  		case 0:
>  		case 3:
>  		default:
> -			wmmps_ac = psta->uapsd_be&BIT(0);
> +			wmmps_ac = psta->uapsd_be & BIT(0);
>  			break;
>  		}
>
> @@ -923,7 +934,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
>  			psta->state ^= WIFI_STA_ALIVE_CHK_STATE;
>  		}
>
> -		if ((psta->state&WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap&BIT(psta->aid))) {
> +		if ((psta->state & WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap & BIT(psta->aid))) {
>  			struct list_head *xmitframe_plist, *xmitframe_phead;
>  			struct xmit_frame *pxmitframe = NULL;
>
> @@ -961,7 +972,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
>  					update_beacon(padapter, _TIM_IE_, NULL, false);
>  				}
>  			} else {
> -				if (pstapriv->tim_bitmap&BIT(psta->aid)) {
> +				if (pstapriv->tim_bitmap & BIT(psta->aid)) {
>  					if (psta->sleepq_len == 0) {
>  						DBG_88E("no buffered packets to xmit\n");
>
> @@ -1160,7 +1171,7 @@ static int validate_recv_frame(struct adapter *adapter,
>  	u8 bDumpRxPkt;
>  	struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
>  	u8 *ptr = precv_frame->pkt->data;
> -	u8  ver = (unsigned char)(*ptr)&0x3;
> +	u8  ver = (unsigned char)(*ptr) & 0x3;
>  	struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
>
>  	if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) {
> @@ -1279,8 +1290,8 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
>  	if (pattrib->encrypt)
>  		skb_trim(precvframe->pkt, precvframe->pkt->len - pattrib->icv_len);
>
> -	psnap = (struct ieee80211_snap_hdr *)(ptr+pattrib->hdrlen + pattrib->iv_len);
> -	psnap_type = ptr+pattrib->hdrlen + pattrib->iv_len+SNAP_SIZE;
> +	psnap = (struct ieee80211_snap_hdr *)(ptr + pattrib->hdrlen + pattrib->iv_len);
> +	psnap_type = ptr + pattrib->hdrlen + pattrib->iv_len + SNAP_SIZE;
>  	/* convert hdr + possible LLC headers into Ethernet header */
>  	if ((!memcmp(psnap, rtw_rfc1042_header, SNAP_SIZE) &&
>  	     memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) &&
> @@ -1299,7 +1310,7 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
>  	RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
>  		 ("\n===pattrib->hdrlen: %x,  pattrib->iv_len:%x===\n\n", pattrib->hdrlen,  pattrib->iv_len));
>
> -	memcpy(&be_tmp, ptr+rmv_len, 2);
> +	memcpy(&be_tmp, ptr + rmv_len, 2);
>  	eth_type = ntohs(be_tmp); /* pattrib->ether_type */
>  	pattrib->eth_type = eth_type;
>
> @@ -1308,11 +1319,11 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
>  		return _FAIL;
>
>  	memcpy(ptr, pattrib->dst, ETH_ALEN);
> -	memcpy(ptr+ETH_ALEN, pattrib->src, ETH_ALEN);
> +	memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN);
>
>  	if (!bsnaphdr) {
>  		be_tmp = htons(len);
> -		memcpy(ptr+12, &be_tmp, 2);
> +		memcpy(ptr + 12, &be_tmp, 2);
>  	}
>
>  	return _SUCCESS;
> @@ -1560,7 +1571,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
>  		pdata += nSubframe_Length;
>  		a_len -= nSubframe_Length;
>  		if (a_len != 0) {
> -			padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & (4-1));
> +			padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & (4 - 1));
>  			if (padding_len == 4)
>  				padding_len = 0;
>
> @@ -1763,7 +1774,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
>  			preorder_ctrl->indicate_seq = pattrib->seq_num;
>  			rtw_recv_indicatepkt(padapter, prframe);
>
> -			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
> +			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
>  			return _SUCCESS;
>  		}
>  	} else if (pattrib->amsdu == 1) { /* temp filter -> means didn't support A-MSDUs in a A-MPDU */
> @@ -1771,7 +1782,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
>  			preorder_ctrl->indicate_seq = pattrib->seq_num;
>  			retval = amsdu_to_msdu(padapter, prframe);
>
> -			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
> +			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
>  			return retval;
>  		}
>  	}
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190316193230.23325-1-sanjana99reddy99%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

* [PATCH v3 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (8 preceding siblings ...)
  2019-03-16 19:32 ` [PATCH 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
@ 2019-03-16 19:49 ` Sanjana Sanikommu
  2019-03-16 19:56 ` [PATCH v4 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 19:49 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

fix a space issue around the below operators mentioned in CHECK.Issue found by checkpatch.pl semantic patch results for
rtw_recv.c..

CHECK: spaces preferred around '%' (ctx:VxV)
CHECK: spaces preferred around '-' (ctx:VxV)
CHECK: spaces preferred around '&' (ctx:VxV)
CHECK: spaces preferred around '+' (ctx:VxV)
CHECK: spaces preferred around '<<' (ctx:VxV)

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
Changes in v3:
fix a overflow of 80 characters which occurred due to fix a spaces around '-'
from the [PATCH v2 3/3]
fix a space issue around '>>' from the [PATCH v2 3/3]
fix a space issue around  '-' from the [PATCH v2 3/3]
Changes in v2:
Remove "From" line from the [PATCH 3/3]
Change subject line in [PATCH 3/3]
Change log message in [PATCH 3/3]
 drivers/staging/rtl8188eu/core/rtw_recv.c | 97 +++++++++++++----------
 1 file changed, 54 insertions(+), 43 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index fc72e797f8e5..d7620b89813f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -252,21 +252,22 @@ static int recvframe_chkmic(struct adapter *adapter,
 			}
 
 			/* icv_len included the mic code */
-			datalen = precvframe->pkt->len-prxattrib->hdrlen -
-				  prxattrib->iv_len-prxattrib->icv_len-8;
+			datalen = precvframe->pkt->len - prxattrib->hdrlen -
+				  prxattrib->iv_len - prxattrib->icv_len - 8;
 			pframe = precvframe->pkt->data;
-			payload = pframe+prxattrib->hdrlen+prxattrib->iv_len;
+			payload = pframe + prxattrib->hdrlen +
+				prxattrib->iv_len;
 
 			RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("\n prxattrib->iv_len=%d prxattrib->icv_len=%d\n", prxattrib->iv_len, prxattrib->icv_len));
 			rtw_seccalctkipmic(mickey, pframe, payload, datalen, &miccode[0],
 					   (unsigned char)prxattrib->priority); /* care the length of the data */
 
-			pframemic = payload+datalen;
+			pframemic = payload + datalen;
 
 			bmic_err = false;
 
 			for (i = 0; i < 8; i++) {
-				if (miccode[i] != *(pframemic+i)) {
+				if (miccode[i] != *(pframemic + i)) {
 					RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
 						 ("%s: miccode[%d](%02x)!=*(pframemic+%d)(%02x) ",
 						  __func__, i, miccode[i], i, *(pframemic + i)));
@@ -277,14 +278,24 @@ static int recvframe_chkmic(struct adapter *adapter,
 			if (bmic_err) {
 				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
 					 ("\n *(pframemic-8)-*(pframemic-1)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
-					 *(pframemic-8), *(pframemic-7), *(pframemic-6),
-					 *(pframemic-5), *(pframemic-4), *(pframemic-3),
-					 *(pframemic-2), *(pframemic-1)));
+					 *(pframemic - 8),
+					 *(pframemic - 7),
+					 *(pframemic - 6),
+					 *(pframemic - 5),
+					 *(pframemic - 4),
+					 *(pframemic - 3),
+					 *(pframemic - 2),
+					 *(pframemic - 1)));
 				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
 					 ("\n *(pframemic-16)-*(pframemic-9)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
-					 *(pframemic-16), *(pframemic-15), *(pframemic-14),
-					 *(pframemic-13), *(pframemic-12), *(pframemic-11),
-					 *(pframemic-10), *(pframemic-9)));
+					 *(pframemic - 16),
+					 *(pframemic - 15),
+					 *(pframemic - 14),
+					 *(pframemic - 13),
+					 *(pframemic - 12),
+					 *(pframemic - 11),
+					 *(pframemic - 10),
+					 *(pframemic - 9)));
 				{
 					uint i;
 
@@ -295,14 +306,14 @@ static int recvframe_chkmic(struct adapter *adapter,
 						RT_TRACE(_module_rtl871x_recv_c_,
 							 _drv_err_,
 							 ("0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x",
-							 *(precvframe->pkt->data+i),
-							 *(precvframe->pkt->data+i+1),
-							 *(precvframe->pkt->data+i+2),
-							 *(precvframe->pkt->data+i+3),
-							 *(precvframe->pkt->data+i+4),
-							 *(precvframe->pkt->data+i+5),
-							 *(precvframe->pkt->data+i+6),
-							 *(precvframe->pkt->data+i+7)));
+							 *(precvframe->pkt->data + i),
+							 *(precvframe->pkt->data + i + 1),
+							 *(precvframe->pkt->data + i + 2),
+							 *(precvframe->pkt->data + i + 3),
+							 *(precvframe->pkt->data + i + 4),
+							 *(precvframe->pkt->data + i + 5),
+							 *(precvframe->pkt->data + i + 6),
+							 *(precvframe->pkt->data + i + 7)));
 					}
 					RT_TRACE(_module_rtl871x_recv_c_,
 						 _drv_err_,
@@ -365,9 +376,9 @@ static struct recv_frame *decryptor(struct adapter *padapter,
 	RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("prxstat->decrypted=%x prxattrib->encrypt=0x%03x\n", prxattrib->bdecrypted, prxattrib->encrypt));
 
 	if (prxattrib->encrypt > 0) {
-		u8 *iv = precv_frame->pkt->data+prxattrib->hdrlen;
+		u8 *iv = precv_frame->pkt->data + prxattrib->hdrlen;
 
-		prxattrib->key_index = (((iv[3])>>6)&0x3);
+		prxattrib->key_index = (((iv[3]) >> 6) & 0x3);
 
 		if (prxattrib->key_index > WEP_KEYS) {
 			DBG_88E("prxattrib->key_index(%d)>WEP_KEYS\n", prxattrib->key_index);
@@ -496,7 +507,7 @@ static int recv_decache(struct recv_frame *precv_frame, u8 bretry,
 {
 	int tid = precv_frame->attrib.priority;
 
-	u16 seq_ctrl = ((precv_frame->attrib.seq_num&0xffff) << 4) |
+	u16 seq_ctrl = ((precv_frame->attrib.seq_num & 0xffff) << 4) |
 		(precv_frame->attrib.frag_num & 0xf);
 
 	if (tid > 15) {
@@ -561,29 +572,29 @@ static void process_wmmps_data(struct adapter *padapter,
 	if (!psta->qos_option)
 		return;
 
-	if (!(psta->qos_info&0xf))
+	if (!(psta->qos_info & 0xf))
 		return;
 
-	if (psta->state&WIFI_SLEEP_STATE) {
+	if (psta->state & WIFI_SLEEP_STATE) {
 		u8 wmmps_ac = 0;
 
 		switch (pattrib->priority) {
 		case 1:
 		case 2:
-			wmmps_ac = psta->uapsd_bk&BIT(1);
+			wmmps_ac = psta->uapsd_bk & BIT(1);
 			break;
 		case 4:
 		case 5:
-			wmmps_ac = psta->uapsd_vi&BIT(1);
+			wmmps_ac = psta->uapsd_vi & BIT(1);
 			break;
 		case 6:
 		case 7:
-			wmmps_ac = psta->uapsd_vo&BIT(1);
+			wmmps_ac = psta->uapsd_vo & BIT(1);
 			break;
 		case 0:
 		case 3:
 		default:
-			wmmps_ac = psta->uapsd_be&BIT(1);
+			wmmps_ac = psta->uapsd_be & BIT(1);
 			break;
 		}
 
@@ -897,20 +908,20 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
 		switch (pattrib->priority) {
 		case 1:
 		case 2:
-			wmmps_ac = psta->uapsd_bk&BIT(0);
+			wmmps_ac = psta->uapsd_bk & BIT(0);
 			break;
 		case 4:
 		case 5:
-			wmmps_ac = psta->uapsd_vi&BIT(0);
+			wmmps_ac = psta->uapsd_vi & BIT(0);
 			break;
 		case 6:
 		case 7:
-			wmmps_ac = psta->uapsd_vo&BIT(0);
+			wmmps_ac = psta->uapsd_vo & BIT(0);
 			break;
 		case 0:
 		case 3:
 		default:
-			wmmps_ac = psta->uapsd_be&BIT(0);
+			wmmps_ac = psta->uapsd_be & BIT(0);
 			break;
 		}
 
@@ -923,7 +934,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
 			psta->state ^= WIFI_STA_ALIVE_CHK_STATE;
 		}
 
-		if ((psta->state&WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap&BIT(psta->aid))) {
+		if ((psta->state & WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap & BIT(psta->aid))) {
 			struct list_head *xmitframe_plist, *xmitframe_phead;
 			struct xmit_frame *pxmitframe = NULL;
 
@@ -961,7 +972,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
 					update_beacon(padapter, _TIM_IE_, NULL, false);
 				}
 			} else {
-				if (pstapriv->tim_bitmap&BIT(psta->aid)) {
+				if (pstapriv->tim_bitmap & BIT(psta->aid)) {
 					if (psta->sleepq_len == 0) {
 						DBG_88E("no buffered packets to xmit\n");
 
@@ -1160,7 +1171,7 @@ static int validate_recv_frame(struct adapter *adapter,
 	u8 bDumpRxPkt;
 	struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
 	u8 *ptr = precv_frame->pkt->data;
-	u8  ver = (unsigned char)(*ptr)&0x3;
+	u8  ver = (unsigned char)(*ptr) & 0x3;
 	struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
 
 	if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) {
@@ -1279,8 +1290,8 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
 	if (pattrib->encrypt)
 		skb_trim(precvframe->pkt, precvframe->pkt->len - pattrib->icv_len);
 
-	psnap = (struct ieee80211_snap_hdr *)(ptr+pattrib->hdrlen + pattrib->iv_len);
-	psnap_type = ptr+pattrib->hdrlen + pattrib->iv_len+SNAP_SIZE;
+	psnap = (struct ieee80211_snap_hdr *)(ptr + pattrib->hdrlen + pattrib->iv_len);
+	psnap_type = ptr + pattrib->hdrlen + pattrib->iv_len + SNAP_SIZE;
 	/* convert hdr + possible LLC headers into Ethernet header */
 	if ((!memcmp(psnap, rtw_rfc1042_header, SNAP_SIZE) &&
 	     memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) &&
@@ -1299,7 +1310,7 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
 	RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
 		 ("\n===pattrib->hdrlen: %x,  pattrib->iv_len:%x===\n\n", pattrib->hdrlen,  pattrib->iv_len));
 
-	memcpy(&be_tmp, ptr+rmv_len, 2);
+	memcpy(&be_tmp, ptr + rmv_len, 2);
 	eth_type = ntohs(be_tmp); /* pattrib->ether_type */
 	pattrib->eth_type = eth_type;
 
@@ -1308,11 +1319,11 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
 		return _FAIL;
 
 	memcpy(ptr, pattrib->dst, ETH_ALEN);
-	memcpy(ptr+ETH_ALEN, pattrib->src, ETH_ALEN);
+	memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN);
 
 	if (!bsnaphdr) {
 		be_tmp = htons(len);
-		memcpy(ptr+12, &be_tmp, 2);
+		memcpy(ptr + 12, &be_tmp, 2);
 	}
 
 	return _SUCCESS;
@@ -1560,7 +1571,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
 		pdata += nSubframe_Length;
 		a_len -= nSubframe_Length;
 		if (a_len != 0) {
-			padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & (4-1));
+			padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & (4 - 1));
 			if (padding_len == 4)
 				padding_len = 0;
 
@@ -1763,7 +1774,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
 			preorder_ctrl->indicate_seq = pattrib->seq_num;
 			rtw_recv_indicatepkt(padapter, prframe);
 
-			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
+			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
 			return _SUCCESS;
 		}
 	} else if (pattrib->amsdu == 1) { /* temp filter -> means didn't support A-MSDUs in a A-MPDU */
@@ -1771,7 +1782,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
 			preorder_ctrl->indicate_seq = pattrib->seq_num;
 			retval = amsdu_to_msdu(padapter, prframe);
 
-			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
+			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
 			return retval;
 		}
 	}
-- 
2.17.1



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

* [PATCH v4 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c.
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (9 preceding siblings ...)
  2019-03-16 19:49 ` [PATCH v3 " Sanjana Sanikommu
@ 2019-03-16 19:56 ` Sanjana Sanikommu
  2019-03-17 10:50   ` Greg KH
  2019-03-17 10:55 ` [PATCH v4 1/4] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
                   ` (2 subsequent siblings)
  13 siblings, 1 reply; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-16 19:56 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

This series fix the following checks. 
fix a paranthesis issue around -> 
fix a space issue 

Changes in v3: 
Change the log message from the [PATCH v2 1/3] 
Change the subject line from the [PATCH v2 2/3] 
Change the log message from the [PATCH v2 2/3] 
fix a overflow of 80 characters from the [PATCH v2 3/3] 
fix a space issue around '>>' from the [PATCH v2 3/3] 
fix a space issue around  '-' from the [PATCH v2 3/3] 

Changes in v2: 
Remove "From" line from the [PATCH 1/3] 
Remove "From" line from the [PATCH 2/3] 
Remove "From" line from the [PATCH 3/3] 
Change subject line in [PATCH 2/3] 
Change subject line in [PATCH 3/3] 
Change log message in [PATCH 2/3] 
Change log message in [PATCH 3/3] 

Sanjana(3):
  Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
  Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe
    -> list in rtw_recv.c

  Staging: rtl8188eu: rtw_recv.c: fix a space issue

 drivers/staging/rtl8188eu/core/rtw_recv.c | 113 ++++++++++++----------
 1 file changed, 62 insertions(+), 51 deletions(-)

-- 
2.17.1



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

* Re: [PATCH v4 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c.
  2019-03-16 19:56 ` [PATCH v4 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
@ 2019-03-17 10:50   ` Greg KH
  0 siblings, 0 replies; 26+ messages in thread
From: Greg KH @ 2019-03-17 10:50 UTC (permalink / raw)
  To: Sanjana Sanikommu; +Cc: outreachy-kernel

On Sun, Mar 17, 2019 at 01:26:19AM +0530, Sanjana Sanikommu wrote:
> This series fix the following checks. 
> fix a paranthesis issue around -> 
> fix a space issue 
> 
> Changes in v3: 
> Change the log message from the [PATCH v2 1/3] 
> Change the subject line from the [PATCH v2 2/3] 
> Change the log message from the [PATCH v2 2/3] 
> fix a overflow of 80 characters from the [PATCH v2 3/3] 
> fix a space issue around '>>' from the [PATCH v2 3/3] 
> fix a space issue around  '-' from the [PATCH v2 3/3] 
> 
> Changes in v2: 
> Remove "From" line from the [PATCH 1/3] 
> Remove "From" line from the [PATCH 2/3] 
> Remove "From" line from the [PATCH 3/3] 
> Change subject line in [PATCH 2/3] 
> Change subject line in [PATCH 3/3] 
> Change log message in [PATCH 2/3] 
> Change log message in [PATCH 3/3] 
> 
> Sanjana(3):
>   Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
>   Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe
>     -> list in rtw_recv.c
> 
>   Staging: rtl8188eu: rtw_recv.c: fix a space issue

I do not see the v4 patches sent to the list anywhere, did I miss them?

Can you please resend.

thanks,

greg k-h


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

* [PATCH v4 1/4] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (10 preceding siblings ...)
  2019-03-16 19:56 ` [PATCH v4 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
@ 2019-03-17 10:55 ` Sanjana Sanikommu
  2019-03-17 11:15   ` sanjana99reddy99
  2019-03-17 10:58 ` [PATCH v4 2/4] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c Sanjana Sanikommu
  2019-03-17 11:02 ` [PATCH v4 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
  13 siblings, 1 reply; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-17 10:55 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

Fix a tab indent issue. Issue found by checkpatch.pl semantic patch results for
rtw_recv.c.

[WARNING]:No extra space at the beginning of a line.

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 1d83affc08ce..0d04057e6cf6 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -24,11 +24,11 @@ static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3};
 
 /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
 static u8 rtw_bridge_tunnel_header[] = {
-       0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
+	0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8
 };
 
 static u8 rtw_rfc1042_header[] = {
-       0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
+	0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00
 };
 
 static void rtw_signal_stat_timer_hdl(struct timer_list *t);
-- 
2.17.1



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

* [PATCH v4 2/4] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (11 preceding siblings ...)
  2019-03-17 10:55 ` [PATCH v4 1/4] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
@ 2019-03-17 10:58 ` Sanjana Sanikommu
  2019-03-17 11:16   ` sanjana99reddy99
  2019-03-17 11:02 ` [PATCH v4 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
  13 siblings, 1 reply; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-17 10:58 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

fix a parathesis issue around '->' .Issue found by checkpatch.pl semantic patch results for
rtw_recv.c

CHECK: Remove unnecessary paranthesis around pframe -> list

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
Changes in v4:
Correct the version the patch sequence number
 drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index 0d04057e6cf6..fc72e797f8e5 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -64,9 +64,9 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
 	precvframe = PTR_ALIGN(precvpriv->pallocated_frame_buf, RXFRAME_ALIGN_SZ);
 
 	for (i = 0; i < NR_RECVFRAME; i++) {
-		INIT_LIST_HEAD(&(precvframe->list));
+		INIT_LIST_HEAD(&precvframe->list);
 
-		list_add_tail(&(precvframe->list),
+		list_add_tail(&precvframe->list,
 				     &(precvpriv->free_recv_queue.queue));
 
 		precvframe->pkt = NULL;
@@ -1336,7 +1336,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
 	plist = phead->next;
 	pfhdr = list_entry(plist, struct recv_frame, list);
 	prframe = pfhdr;
-	list_del_init(&(prframe->list));
+	list_del_init(&prframe->list);
 
 	if (curfragnum != pfhdr->attrib.frag_num) {
 		/* the first fragment number must be 0 */
@@ -1663,9 +1663,9 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
 			break;
 	}
 
-	list_del_init(&(prframe->list));
+	list_del_init(&prframe->list);
 
-	list_add_tail(&(prframe->list), plist);
+	list_add_tail(&prframe->list), plist;
 	return true;
 }
 
@@ -1704,7 +1704,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
 				 ("%s: indicate=%d seq=%d amsdu=%d\n",
 				  __func__, preorder_ctrl->indicate_seq, pattrib->seq_num, pattrib->amsdu));
 			plist = plist->next;
-			list_del_init(&(prframe->list));
+			list_del_init(&prframe->list);
 
 			if (SN_EQUAL(preorder_ctrl->indicate_seq, pattrib->seq_num))
 				preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;
-- 
2.17.1



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

* [PATCH v4 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue
  2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
                   ` (12 preceding siblings ...)
  2019-03-17 10:58 ` [PATCH v4 2/4] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c Sanjana Sanikommu
@ 2019-03-17 11:02 ` Sanjana Sanikommu
  13 siblings, 0 replies; 26+ messages in thread
From: Sanjana Sanikommu @ 2019-03-17 11:02 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel

fix a space issue around the below operators mentioned in CHECK. Issue found by checkpatch.pl semantic patch results for
rtw_recv.c..

CHECK: spaces preferred around '%' (ctx:VxV)
CHECK: spaces preferred around '-' (ctx:VxV)
CHECK: spaces preferred around '&' (ctx:VxV)
CHECK: spaces preferred around '+' (ctx:VxV)
CHECK: spaces preferred around '<<' (ctx:VxV)

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
Changes in v4:
Correc the version of patch sequence number.
 drivers/staging/rtl8188eu/core/rtw_recv.c | 97 +++++++++++++----------
 1 file changed, 54 insertions(+), 43 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index fc72e797f8e5..d7620b89813f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -252,21 +252,22 @@ static int recvframe_chkmic(struct adapter *adapter,
 			}
 
 			/* icv_len included the mic code */
-			datalen = precvframe->pkt->len-prxattrib->hdrlen -
-				  prxattrib->iv_len-prxattrib->icv_len-8;
+			datalen = precvframe->pkt->len - prxattrib->hdrlen -
+				  prxattrib->iv_len - prxattrib->icv_len - 8;
 			pframe = precvframe->pkt->data;
-			payload = pframe+prxattrib->hdrlen+prxattrib->iv_len;
+			payload = pframe + prxattrib->hdrlen +
+				prxattrib->iv_len;
 
 			RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("\n prxattrib->iv_len=%d prxattrib->icv_len=%d\n", prxattrib->iv_len, prxattrib->icv_len));
 			rtw_seccalctkipmic(mickey, pframe, payload, datalen, &miccode[0],
 					   (unsigned char)prxattrib->priority); /* care the length of the data */
 
-			pframemic = payload+datalen;
+			pframemic = payload + datalen;
 
 			bmic_err = false;
 
 			for (i = 0; i < 8; i++) {
-				if (miccode[i] != *(pframemic+i)) {
+				if (miccode[i] != *(pframemic + i)) {
 					RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
 						 ("%s: miccode[%d](%02x)!=*(pframemic+%d)(%02x) ",
 						  __func__, i, miccode[i], i, *(pframemic + i)));
@@ -277,14 +278,24 @@ static int recvframe_chkmic(struct adapter *adapter,
 			if (bmic_err) {
 				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
 					 ("\n *(pframemic-8)-*(pframemic-1)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
-					 *(pframemic-8), *(pframemic-7), *(pframemic-6),
-					 *(pframemic-5), *(pframemic-4), *(pframemic-3),
-					 *(pframemic-2), *(pframemic-1)));
+					 *(pframemic - 8),
+					 *(pframemic - 7),
+					 *(pframemic - 6),
+					 *(pframemic - 5),
+					 *(pframemic - 4),
+					 *(pframemic - 3),
+					 *(pframemic - 2),
+					 *(pframemic - 1)));
 				RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
 					 ("\n *(pframemic-16)-*(pframemic-9)=0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
-					 *(pframemic-16), *(pframemic-15), *(pframemic-14),
-					 *(pframemic-13), *(pframemic-12), *(pframemic-11),
-					 *(pframemic-10), *(pframemic-9)));
+					 *(pframemic - 16),
+					 *(pframemic - 15),
+					 *(pframemic - 14),
+					 *(pframemic - 13),
+					 *(pframemic - 12),
+					 *(pframemic - 11),
+					 *(pframemic - 10),
+					 *(pframemic - 9)));
 				{
 					uint i;
 
@@ -295,14 +306,14 @@ static int recvframe_chkmic(struct adapter *adapter,
 						RT_TRACE(_module_rtl871x_recv_c_,
 							 _drv_err_,
 							 ("0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x",
-							 *(precvframe->pkt->data+i),
-							 *(precvframe->pkt->data+i+1),
-							 *(precvframe->pkt->data+i+2),
-							 *(precvframe->pkt->data+i+3),
-							 *(precvframe->pkt->data+i+4),
-							 *(precvframe->pkt->data+i+5),
-							 *(precvframe->pkt->data+i+6),
-							 *(precvframe->pkt->data+i+7)));
+							 *(precvframe->pkt->data + i),
+							 *(precvframe->pkt->data + i + 1),
+							 *(precvframe->pkt->data + i + 2),
+							 *(precvframe->pkt->data + i + 3),
+							 *(precvframe->pkt->data + i + 4),
+							 *(precvframe->pkt->data + i + 5),
+							 *(precvframe->pkt->data + i + 6),
+							 *(precvframe->pkt->data + i + 7)));
 					}
 					RT_TRACE(_module_rtl871x_recv_c_,
 						 _drv_err_,
@@ -365,9 +376,9 @@ static struct recv_frame *decryptor(struct adapter *padapter,
 	RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("prxstat->decrypted=%x prxattrib->encrypt=0x%03x\n", prxattrib->bdecrypted, prxattrib->encrypt));
 
 	if (prxattrib->encrypt > 0) {
-		u8 *iv = precv_frame->pkt->data+prxattrib->hdrlen;
+		u8 *iv = precv_frame->pkt->data + prxattrib->hdrlen;
 
-		prxattrib->key_index = (((iv[3])>>6)&0x3);
+		prxattrib->key_index = (((iv[3]) >> 6) & 0x3);
 
 		if (prxattrib->key_index > WEP_KEYS) {
 			DBG_88E("prxattrib->key_index(%d)>WEP_KEYS\n", prxattrib->key_index);
@@ -496,7 +507,7 @@ static int recv_decache(struct recv_frame *precv_frame, u8 bretry,
 {
 	int tid = precv_frame->attrib.priority;
 
-	u16 seq_ctrl = ((precv_frame->attrib.seq_num&0xffff) << 4) |
+	u16 seq_ctrl = ((precv_frame->attrib.seq_num & 0xffff) << 4) |
 		(precv_frame->attrib.frag_num & 0xf);
 
 	if (tid > 15) {
@@ -561,29 +572,29 @@ static void process_wmmps_data(struct adapter *padapter,
 	if (!psta->qos_option)
 		return;
 
-	if (!(psta->qos_info&0xf))
+	if (!(psta->qos_info & 0xf))
 		return;
 
-	if (psta->state&WIFI_SLEEP_STATE) {
+	if (psta->state & WIFI_SLEEP_STATE) {
 		u8 wmmps_ac = 0;
 
 		switch (pattrib->priority) {
 		case 1:
 		case 2:
-			wmmps_ac = psta->uapsd_bk&BIT(1);
+			wmmps_ac = psta->uapsd_bk & BIT(1);
 			break;
 		case 4:
 		case 5:
-			wmmps_ac = psta->uapsd_vi&BIT(1);
+			wmmps_ac = psta->uapsd_vi & BIT(1);
 			break;
 		case 6:
 		case 7:
-			wmmps_ac = psta->uapsd_vo&BIT(1);
+			wmmps_ac = psta->uapsd_vo & BIT(1);
 			break;
 		case 0:
 		case 3:
 		default:
-			wmmps_ac = psta->uapsd_be&BIT(1);
+			wmmps_ac = psta->uapsd_be & BIT(1);
 			break;
 		}
 
@@ -897,20 +908,20 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
 		switch (pattrib->priority) {
 		case 1:
 		case 2:
-			wmmps_ac = psta->uapsd_bk&BIT(0);
+			wmmps_ac = psta->uapsd_bk & BIT(0);
 			break;
 		case 4:
 		case 5:
-			wmmps_ac = psta->uapsd_vi&BIT(0);
+			wmmps_ac = psta->uapsd_vi & BIT(0);
 			break;
 		case 6:
 		case 7:
-			wmmps_ac = psta->uapsd_vo&BIT(0);
+			wmmps_ac = psta->uapsd_vo & BIT(0);
 			break;
 		case 0:
 		case 3:
 		default:
-			wmmps_ac = psta->uapsd_be&BIT(0);
+			wmmps_ac = psta->uapsd_be & BIT(0);
 			break;
 		}
 
@@ -923,7 +934,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
 			psta->state ^= WIFI_STA_ALIVE_CHK_STATE;
 		}
 
-		if ((psta->state&WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap&BIT(psta->aid))) {
+		if ((psta->state & WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap & BIT(psta->aid))) {
 			struct list_head *xmitframe_plist, *xmitframe_phead;
 			struct xmit_frame *pxmitframe = NULL;
 
@@ -961,7 +972,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
 					update_beacon(padapter, _TIM_IE_, NULL, false);
 				}
 			} else {
-				if (pstapriv->tim_bitmap&BIT(psta->aid)) {
+				if (pstapriv->tim_bitmap & BIT(psta->aid)) {
 					if (psta->sleepq_len == 0) {
 						DBG_88E("no buffered packets to xmit\n");
 
@@ -1160,7 +1171,7 @@ static int validate_recv_frame(struct adapter *adapter,
 	u8 bDumpRxPkt;
 	struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
 	u8 *ptr = precv_frame->pkt->data;
-	u8  ver = (unsigned char)(*ptr)&0x3;
+	u8  ver = (unsigned char)(*ptr) & 0x3;
 	struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
 
 	if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) {
@@ -1279,8 +1290,8 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
 	if (pattrib->encrypt)
 		skb_trim(precvframe->pkt, precvframe->pkt->len - pattrib->icv_len);
 
-	psnap = (struct ieee80211_snap_hdr *)(ptr+pattrib->hdrlen + pattrib->iv_len);
-	psnap_type = ptr+pattrib->hdrlen + pattrib->iv_len+SNAP_SIZE;
+	psnap = (struct ieee80211_snap_hdr *)(ptr + pattrib->hdrlen + pattrib->iv_len);
+	psnap_type = ptr + pattrib->hdrlen + pattrib->iv_len + SNAP_SIZE;
 	/* convert hdr + possible LLC headers into Ethernet header */
 	if ((!memcmp(psnap, rtw_rfc1042_header, SNAP_SIZE) &&
 	     memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) &&
@@ -1299,7 +1310,7 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
 	RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
 		 ("\n===pattrib->hdrlen: %x,  pattrib->iv_len:%x===\n\n", pattrib->hdrlen,  pattrib->iv_len));
 
-	memcpy(&be_tmp, ptr+rmv_len, 2);
+	memcpy(&be_tmp, ptr + rmv_len, 2);
 	eth_type = ntohs(be_tmp); /* pattrib->ether_type */
 	pattrib->eth_type = eth_type;
 
@@ -1308,11 +1319,11 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
 		return _FAIL;
 
 	memcpy(ptr, pattrib->dst, ETH_ALEN);
-	memcpy(ptr+ETH_ALEN, pattrib->src, ETH_ALEN);
+	memcpy(ptr + ETH_ALEN, pattrib->src, ETH_ALEN);
 
 	if (!bsnaphdr) {
 		be_tmp = htons(len);
-		memcpy(ptr+12, &be_tmp, 2);
+		memcpy(ptr + 12, &be_tmp, 2);
 	}
 
 	return _SUCCESS;
@@ -1560,7 +1571,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
 		pdata += nSubframe_Length;
 		a_len -= nSubframe_Length;
 		if (a_len != 0) {
-			padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & (4-1));
+			padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & (4 - 1));
 			if (padding_len == 4)
 				padding_len = 0;
 
@@ -1763,7 +1774,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
 			preorder_ctrl->indicate_seq = pattrib->seq_num;
 			rtw_recv_indicatepkt(padapter, prframe);
 
-			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
+			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
 			return _SUCCESS;
 		}
 	} else if (pattrib->amsdu == 1) { /* temp filter -> means didn't support A-MSDUs in a A-MPDU */
@@ -1771,7 +1782,7 @@ static int recv_indicatepkt_reorder(struct adapter *padapter,
 			preorder_ctrl->indicate_seq = pattrib->seq_num;
 			retval = amsdu_to_msdu(padapter, prframe);
 
-			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
+			preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) % 4096;
 			return retval;
 		}
 	}
-- 
2.17.1



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

* Re: [PATCH v4 1/4] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
  2019-03-17 10:55 ` [PATCH v4 1/4] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
@ 2019-03-17 11:15   ` sanjana99reddy99
  2019-03-17 11:41     ` [Outreachy kernel] " Greg KH
  0 siblings, 1 reply; 26+ messages in thread
From: sanjana99reddy99 @ 2019-03-17 11:15 UTC (permalink / raw)
  To: outreachy-kernel


[-- Attachment #1.1: Type: text/plain, Size: 86 bytes --]



There is a typo in subject line of [PATCH v4 1/4].
Correction:
It is PATCH [v4 1/3]

[-- Attachment #1.2: Type: text/html, Size: 132 bytes --]

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

* Re: [PATCH v4 2/4] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c
  2019-03-17 10:58 ` [PATCH v4 2/4] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c Sanjana Sanikommu
@ 2019-03-17 11:16   ` sanjana99reddy99
  0 siblings, 0 replies; 26+ messages in thread
From: sanjana99reddy99 @ 2019-03-17 11:16 UTC (permalink / raw)
  To: outreachy-kernel


[-- Attachment #1.1: Type: text/plain, Size: 94 bytes --]


>
> There is correction in subject line of [PATCH v4 2/4]

Correction:
It is [PATCH v4 2/3] 

[-- Attachment #1.2: Type: text/html, Size: 258 bytes --]

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

* Re: [Outreachy kernel] Re: [PATCH v4 1/4] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
  2019-03-17 11:15   ` sanjana99reddy99
@ 2019-03-17 11:41     ` Greg KH
  0 siblings, 0 replies; 26+ messages in thread
From: Greg KH @ 2019-03-17 11:41 UTC (permalink / raw)
  To: sanjana99reddy99; +Cc: outreachy-kernel

On Sun, Mar 17, 2019 at 04:15:11AM -0700, sanjana99reddy99@gmail.com wrote:
> 
> 
> There is a typo in subject line of [PATCH v4 1/4].
> Correction:
> It is PATCH [v4 1/3]

Nothing I can do about this after you have sent it :)

Please fix this all up and resend them properly.  A maintainer should
never have to hand-edit a patch, otherwise something is wrong.

thanks,

greg k-h


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

end of thread, other threads:[~2019-03-17 11:42 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-16 13:33 [PATCH 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
2019-03-16 13:35 ` [PATCH 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
2019-03-16 13:37 ` [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue Sanjana Sanikommu
2019-03-16 13:38   ` [PATCH 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
2019-03-16 13:49   ` [Outreachy kernel] [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue Julia Lawall
     [not found]     ` <a3fb8066-35c9-4437-a698-702363bd39bc@googlegroups.com>
2019-03-16 17:00       ` Julia Lawall
2019-03-16 15:22 ` [PATCH v2 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
2019-03-16 16:43   ` [Outreachy kernel] " Julia Lawall
2019-03-16 16:25 ` [PATCH v2 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis -> parenthesis issue Sanjana Sanikommu
2019-03-16 16:42   ` [Outreachy kernel] " Julia Lawall
2019-03-16 16:29 ` [PATCH v2 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
2019-03-16 16:40   ` [Outreachy kernel] " Julia Lawall
2019-03-16 19:24 ` [PATCH v3 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
2019-03-16 19:25 ` [PATCH v3 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
2019-03-16 19:29 ` [PATCH v3 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c Sanjana Sanikommu
2019-03-16 19:32 ` [PATCH 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu
2019-03-16 19:41   ` [Outreachy kernel] " Julia Lawall
2019-03-16 19:49 ` [PATCH v3 " Sanjana Sanikommu
2019-03-16 19:56 ` [PATCH v4 0/3] Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c Sanjana Sanikommu
2019-03-17 10:50   ` Greg KH
2019-03-17 10:55 ` [PATCH v4 1/4] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue Sanjana Sanikommu
2019-03-17 11:15   ` sanjana99reddy99
2019-03-17 11:41     ` [Outreachy kernel] " Greg KH
2019-03-17 10:58 ` [PATCH v4 2/4] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c Sanjana Sanikommu
2019-03-17 11:16   ` sanjana99reddy99
2019-03-17 11:02 ` [PATCH v4 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue Sanjana Sanikommu

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.