staging: rtl8712: Place constants on the right side of '=='
PATCH v2 3/3 staging: rtl8712: Place constants on the right side of '=='
Move constants to the right of binary operators. This issue was identified using the Coccinelle script:
@@
constant c,c1;
expression e,e1,e2;
local idexpression i;
binary operator b = {==,!=,&,|};
@@
(
c b (c1)
|
i b e1
|
c | e1 | e2 | ...
|
c | (e ? e1 : e2)
|
- c
+ e
b
- e
+ c
)
Signed-off-by Bhaktipriya Shridhar <[email protected]>
---
Changes in v2:
-change subject line
-inserted Coccinelle script
drivers/staging/rtl8712/rtl871x_xmit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/rtl871x_xmit.c +2 -2
@@ -241,7 +241,7 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt, }/* r8712_xmitframe_coalesce() overwrite this!*/ 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 */
@@ -250,7 +250,7 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt,_r8712_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
--
2.1.4