Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c.
cover Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c.
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(-)
Signature · 1 line
2.17.1
PATCH 1/3 Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
From: Sanjana <[email protected]>
Fix a tab indent issue which removed warnings after compilation using checkpatch.pl.
[WARNING]:No extra space at the beginning of a line.
--- drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +2 -2
@@ -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);
Signature · 1 line
2.17.1
PATCH 2/3 Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue
In reply to Sanjana SanikommuFrom: Sanjana <[email protected]>
This patch fixes the checkpatch.pl CHECK in rtw_recv.c file:
CHECK: Unnecessary paranthesis around prframe->list
--- drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +6 -6
@@ -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 ;
Signature · 1 line
2.17.1
PATCH 3/3 Staging: rtl8188eu: rtw_recv.c: fix a space issue
From: Sanjana <[email protected]>
This patch fixes the checkpatch.pl CHECK in rtw_recv.c file:
CHECK: spaces preferred around '%' (ctx:VxV)
--- drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +2 -2
@@ -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; } }
Signature · 1 line
2.17.1
Re: [Outreachy kernel] [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue
In reply to Sanjana SanikommuQuoted 1 line · Sanjana Sanikommu
From: Sanjana <[email protected]>
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.
Quoted 1 line
This patch fixes the checkpatch.pl CHECK in
rtw_recv.cfile:
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
Quoted 64 lines
CHECK: Unnecessary paranthesis around
prframe->listSigned-off-by Sanjana Sanikommu <[email protected]>--- drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/staging/rtl8188eu/core/rtw_recv.c +6
-7@@ -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 [email protected]. To post to this group, send email to [email protected].
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.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [Outreachy kernel] [PATCH 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue
Quoted 6 lines · On Sat, 16 Mar 2019, [email protected] wrote:
Yeah, I would change them.
Quoted 6 lines
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
Quoted 3 lines
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
Quoted 18 lines
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 [email protected].
To post to this group, send email to [email protected].
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.
PATCH v2 1/3 Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
In reply to Sanjana SanikommuFix a tab indent issue which removed warnings after compilation using checkpatch.pl.
[WARNING]:No extra space at the beginning of a line.
--- drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +2 -2
@@ -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);
Signature · 1 line
2.17.1
Re: [Outreachy kernel] [PATCH v2 1/3] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
Quoted 7 lines · Sanjana Sanikommu
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 <[email protected]>---
For a v2, you have to describe what has changed here, or if nothing has changed, say that nothing has changed.
julia
Quoted 31 lines
drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/rtl8188eu/core/rtw_recv.c +2
-3@@ -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 [email protected]. To post to this group, send email to [email protected].
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.
PATCH v2 2/3 Staging: rtl8188eu: rtw_recv.c: fix a paranthesis -> parenthesis issue.
In reply to Sanjana SanikommuFix a paranthesis -> parenthesis issue which removed check after compiled using checkpatch.pl
CHECK: Remove unnecessary paranthesis -> paranthesis.
--- drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +6 -6
@@ -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 ;
Signature · 1 line
2.17.1
Re: [Outreachy kernel] [PATCH v2 2/3] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis -> parenthesis issue.
Quoted 2 lines · Sanjana Sanikommu
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
Quoted 64 lines
CHECK: Remove unnecessary paranthesis -> paranthesis.
Signed-off-by Sanjana Sanikommu <[email protected]>--- drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/staging/rtl8188eu/core/rtw_recv.c +6
-7@@ -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 [email protected]. To post to this group, send email to [email protected].
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.
PATCH v2 3/3 Staging: rtl8188eu: rtw_recv.c: fix a space issue
In reply to Sanjana SanikommuFix 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)
--- drivers/staging/rtl8188eu/core/rtw_recv.c | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +12 -12
@@ -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; } }
Signature · 1 line
2.17.1
Re: [Outreachy kernel] [PATCH v2 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue
Quoted 2 lines · Sanjana Sanikommu
Fix a space issue which removed checks after compilation using checkpatch.pl.
I don't understand "removed checks after compilation".
Quoted 15 lines
CHECK: spaces preferred around '%' (ctx:VxV)
CHECK: spaces preferred around '-' (ctx:VxV)
CHECK: spaces preferred around '&' (ctx:VxV)Signed-off-by Sanjana Sanikommu <[email protected]>--- drivers/staging/rtl8188eu/core/rtw_recv.c | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)drivers/staging/rtl8188eu/core/rtw_recv.c +0
-0
drivers/staging/rtl8188eu/core/rtw_recv.c static int recvframe_chkmic(struct adapter *adapter, · line 256
Quoted 5 lines
drivers/staging/rtl8188eu/core/rtw_recv.c +1
-1@@ -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.
Quoted 11 lines
drivers/staging/rtl8188eu/core/rtw_recv.c +1
-3pframe = 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),
drivers/staging/rtl8188eu/core/rtw_recv.c static int recvframe_chkmic(struct adapter *adapter, · line 287
Quoted 10 lines
drivers/staging/rtl8188eu/core/rtw_recv.c +5
-3+ *(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.
drivers/staging/rtl8188eu/core/rtw_recv.c static struct recv_frame *decryptor(struct adapter *padapter, · line 370
Quoted 9 lines
drivers/staging/rtl8188eu/core/rtw_recv.c +1
-1{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
Quoted 49 lines
drivers/staging/rtl8188eu/core/rtw_recv.c +4
-5if (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 [email protected]. To post to this group, send email to [email protected].
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.
v3 cover Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c.
In reply to Sanjana SanikommuThis 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(-)
Signature · 1 line
2.17.1
PATCH v3 1/3 Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
In reply to Sanjana SanikommuFix 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.
---
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(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +2 -2
@@ -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);
Signature · 1 line
2.17.1
PATCH v3 2/3 Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c
In reply to Sanjana Sanikommufix a parathesis issue around '->' .Issue found by checkpatch.pl semantic patch results for rtw_recv.c
CHECK: Remove unnecessary paranthesis around pframe -> list
---
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(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +6 -6
@@ -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 ;
Signature · 1 line
2.17.1
PATCH 3/3 Staging: rtl8188eu: rtw_recv.c: fix a space issue
In reply to Sanjana Sanikommufix 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)
---
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(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +54 -43
@@ -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; } }
Signature · 1 line
2.17.1
Re: [Outreachy kernel] [PATCH 3/3] Staging: rtl8188eu: rtw_recv.c: fix a space issue
You are missing the v3 in the subject line.
julia
Quoted 291 lines · Sanjana Sanikommu
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 <[email protected]>---
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(-)drivers/staging/rtl8188eu/core/rtw_recv.c +54
-44@@ -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 [email protected]. To post to this group, send email to [email protected].
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.
PATCH v3 3/3 Staging: rtl8188eu: rtw_recv.c: fix a space issue
In reply to Sanjana Sanikommufix 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)
---
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(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +54 -43
@@ -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; } }
Signature · 1 line
2.17.1
v4 cover Staging: rtl8188eu: rtw_recv.c: fix various warnings and checks in rtw_recv.c.
In reply to Sanjana SanikommuThis 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(-)
Signature · 1 line
2.17.1
Greg KH
maintainerQuoted 21 lines · Sanjana Sanikommu
This series fix the following checks.
fix a paranthesis issue around ->
fix a space issueChanges 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]
Quoted 6 lines
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.cStaging: 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
PATCH v4 1/4 Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
In reply to Sanjana SanikommuFix 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.
--- drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +2 -2
@@ -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);
Signature · 1 line
2.17.1
Re: [PATCH v4 1/4] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
There is a typo in subject line of [PATCH v4 1/4]. Correction:
It is PATCH [v4 1/3]
Greg KH
maintainerRe: [Outreachy kernel] Re: [PATCH v4 1/4] Staging: rtl8188eu: rtw_recv.c: fix a tab indent issue
Quoted 5 lines · On Sun, Mar 17, 2019 at 04:15:11AM -0700, [email protected] 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
PATCH v4 2/4 Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c
In reply to Sanjana Sanikommufix a parathesis issue around '->' .Issue found by checkpatch.pl semantic patch results for rtw_recv.c
CHECK: Remove unnecessary paranthesis around pframe -> list
---
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(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +6 -6
@@ -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 ;
Signature · 1 line
2.17.1
Re: [PATCH v4 2/4] Staging: rtl8188eu: rtw_recv.c: fix a paranthesis issue around pframe -> list in rtw_recv.c
Quoted 3 lines
There is correction in subject line of [PATCH v4 2/4]
Correction:
It is [PATCH v4 2/3]
PATCH v4 3/3 Staging: rtl8188eu: rtw_recv.c: fix a space issue
In reply to Sanjana Sanikommufix 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)
---
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(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +54 -43
@@ -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; } }
Signature · 1 line
2.17.1