staging: rtl8188eu: core: rtw_xmit: Move constant of the right side
PATCH 1/1 staging: rtl8188eu: core: rtw_xmit: Move constant of the right side
Constants should be on the right side of comparisons.
Issue found by checkpatch.pl script.
--- drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8188eu/core/rtw_xmit.c +3 -3
@@ -451,14 +451,14 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p pattrib->pktlen = pktfile.pkt_len; -if (ETH_P_IP == pattrib->ether_type) { +if (pattrib->ether_type ==ETH_P_IP ) {/* The following is for DHCP and ARP packet, we use cck1M to tx these packets and let LPS awake some time */ /* to prevent DHCP protocol fail */ u8 tmp[24 ];_rtw_pktfile_read (&pktfile, &tmp[0 ],24 ); pattrib->dhcp_pkt =0 ;if (pktfile.pkt_len >282 ) {/* MINIMUM_DHCP_PACKET_SIZE) { */ -if (ETH_P_IP == pattrib->ether_type) {/* IP header */ +if (pattrib->ether_type ==ETH_P_IP ) {/* IP header */ if (((tmp[21 ] ==68 ) && (tmp[23 ] ==67 )) || ((tmp[21 ] ==67 ) && (tmp[23 ] ==68 ))) {/* 68 : UDP BOOTP client */
@@ -469,7 +469,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p } } } - }else if (0x888e == pattrib->ether_type) { + }else if (pattrib->ether_type ==0x888e ) {DBG_88E_LEVEL (_drv_info_,"send eapol packet\n" ); }
Signature · 1 line
2.7.4
Quoted 5 lines · Georgiana Rodica Chelu
Constants should be on the right side of comparisons.
Issue found by checkpatch.pl script.
Signed-off-by Georgiana Rodica Chelu <[email protected]>
I wonder if there is some more meaningful way to describe 0x888e.
julia
Quoted 44 lines
--- drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/rtl8188eu/core/rtw_xmit.c +3
-4@@ -451,14 +451,14 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p pattrib->pktlen = pktfile.pkt_len; -if (ETH_P_IP == pattrib->ether_type) { +if (pattrib->ether_type ==ETH_P_IP ) {/* The following is for DHCP and ARP packet, we use cck1M to tx these packets and let LPS awake some time */ /* to prevent DHCP protocol fail */ u8 tmp[24 ];_rtw_pktfile_read (&pktfile, &tmp[0 ],24 ); pattrib->dhcp_pkt =0 ;if (pktfile.pkt_len >282 ) {/* MINIMUM_DHCP_PACKET_SIZE) { */ -if (ETH_P_IP == pattrib->ether_type) {/* IP header */ +if (pattrib->ether_type ==ETH_P_IP ) {/* IP header */ if (((tmp[21 ] ==68 ) && (tmp[23 ] ==67 )) || ((tmp[21 ] ==67 ) && (tmp[23 ] ==68 ))) {/* 68 : UDP BOOTP client */ @@ -469,7 +469,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p } } } - }else if (0x888e == pattrib->ether_type) { + }else if (pattrib->ether_type ==0x888e ) {DBG_88E_LEVEL (_drv_info_,"send eapol packet\n" ); } --2.7.4
--
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/20160928203302.GA19044%40fireworks.
For more options, visit https://groups.google.com/d/optout.
Yes, I am working on this :)
Georgiana
Quoted 71 lines · Julia Lawall
Quoted 5 lines · Georgiana Rodica Chelu
Constants should be on the right side of comparisons.
Issue found by checkpatch.pl script.
Signed-off-by Georgiana Rodica Chelu <[email protected]>Acked-by Julia Lawall <[email protected]>I wonder if there is some more meaningful way to describe
0x888e.julia
Review
Quoted 5 lines
--- drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/staging/rtl8188eu/core/rtw_xmit.cdrivers/staging/rtl8188eu/core/rtw_xmit.c static s32 update_attrib(struct adapter *padapter,
Quoted 4 lines
index 1d2817b..1392899 100644
drivers/staging/rtl8188eu/core/rtw_xmit.c +0
-0@@ -451,14 +451,14 @@ static s32 update_attrib(struct adapter *padapter,struct
sk_buff*pkt, struct pdrivers/staging/rtl8188eu/core/rtw_xmit.c static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
Quoted 6 lines
drivers/staging/rtl8188eu/core/rtw_xmit.c +1
-1pattrib->pktlen = pktfile.pkt_len; -if (ETH_P_IP == pattrib->ether_type) { +if (pattrib->ether_type ==ETH_P_IP ) {/* The following is for DHCP and ARP packet, we use cck1M to tx these packets and let LPS awake some time */
drivers/staging/rtl8188eu/core/rtw_xmit.c static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
Quoted 5 lines
drivers/staging/rtl8188eu/core/rtw_xmit.c +0
-0/* to prevent DHCP protocol fail */ u8 tmp[24 ];_rtw_pktfile_read (&pktfile, &tmp[0 ],24 ); pattrib->dhcp_pkt =0 ;if (pktfile.pkt_len >282 ) {/* MINIMUM_DHCP_PACKET_SIZE) { */
drivers/staging/rtl8188eu/core/rtw_xmit.c static s32 update_attrib(struct adapter *padapter, · line 460
Quoted 1 line
drivers/staging/rtl8188eu/core/rtw_xmit.c +0
-1-if (ETH_P_IP == pattrib->ether_type) {/* IP header */
drivers/staging/rtl8188eu/core/rtw_xmit.c static s32 update_attrib(struct adapter *padapter, · line 460
Quoted 1 line
drivers/staging/rtl8188eu/core/rtw_xmit.c +1
-0+if (pattrib->ether_type ==ETH_P_IP ) {/* IP header */
drivers/staging/rtl8188eu/core/rtw_xmit.c static s32 update_attrib(struct adapter *padapter,
Quoted 4 lines
drivers/staging/rtl8188eu/core/rtw_xmit.c +0
-0if (((tmp[21 ] ==68 ) && (tmp[23 ] ==67 )) || ((tmp[21 ] ==67 ) && (tmp[23 ] ==68 ))) {/* 68 : UDP BOOTP client */ @@ -469,7 +469,7 @@ static s32 update_attrib(struct adapter *padapter,struct
sk_buff*pkt, struct pQuoted 11 lines
drivers/staging/rtl8188eu/core/rtw_xmit.c +1
-2} } } - }else if (0x888e == pattrib->ether_type) { + }else if (pattrib->ether_type ==0x888e ) {DBG_88E_LEVEL (_drv_info_,"send eapol packet\n" ); } --2.7.4
Quoted 2 lines
--
You received this message because you are subscribed to the GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
Quoted 2 lines
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/20160928203302.GA19044%40fireworks.
Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.