Skip to contentSkip to conversation

staging: rtl8712: Place constants on the right side

PATCH Superseded Bhaktipriya Shridhar 1 participant 1 message Feb 19, 2016 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 staging: rtl8712: Place constants on the right side

Move constants to the right of binary operators. This issue was identified using the Coccinelle script:
misc/compare_const_fl.cocci

---
 drivers/staging/rtl8712/rtl8712_efuse.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8712/rtl8712_efuse.c +4 -4
index 76f60ba..2ae0ae6 100644
@@ -85,7 +85,7 @@ static u8 efuse_one_byte_read(struct _adapter *padapter, u16 addr, u8 *data)
 	       (r8712_read8(padapter, EFUSE_CTRL + 2) & 0xFC));
 	r8712_write8(padapter, EFUSE_CTRL + 3, 0x72); /* read cmd */
 	/* wait for complete */
-	while (!(0x80 & r8712_read8(padapter, EFUSE_CTRL + 3)) &&
+	while (!(r8712_read8(padapter, EFUSE_CTRL + 3) & 0x80) &&
 	       (tmpidx < 100))
 		tmpidx++;
 	if (tmpidx < 100) {
@@ -109,7 +109,7 @@ static u8 efuse_one_byte_write(struct _adapter *padapter, u16 addr, u8 data)
 	r8712_write8(padapter, EFUSE_CTRL, data); /* data */
 	r8712_write8(padapter, EFUSE_CTRL + 3, 0xF2); /* write cmd */
 	/* wait for complete */
-	while ((0x80 &  r8712_read8(padapter, EFUSE_CTRL + 3)) &&
+	while ((r8712_read8(padapter, EFUSE_CTRL + 3) &  0x80) &&
 	       (tmpidx < 100))
 		tmpidx++;
 	if (tmpidx < 100)
@@ -131,7 +131,7 @@ static u8 efuse_one_byte_rw(struct _adapter *padapter, u8 bRead, u16 addr,
 	r8712_write8(padapter, EFUSE_CTRL + 2, tmpv8);
 	if (bRead) {
 		r8712_write8(padapter, EFUSE_CTRL + 3,  0x72); /* read cmd */
-		while (!(0x80 & r8712_read8(padapter, EFUSE_CTRL + 3)) &&
+		while (!(r8712_read8(padapter, EFUSE_CTRL + 3) & 0x80) &&
 		       (tmpidx < 100))
 			tmpidx++;
 		if (tmpidx < 100) {
@@ -144,7 +144,7 @@ static u8 efuse_one_byte_rw(struct _adapter *padapter, u8 bRead, u16 addr,
 	} else {
 		r8712_write8(padapter, EFUSE_CTRL, *data); /* data */
 		r8712_write8(padapter, EFUSE_CTRL + 3, 0xF2); /* write cmd */
-		while ((0x80 & r8712_read8(padapter, EFUSE_CTRL + 3)) &&
+		while ((r8712_read8(padapter, EFUSE_CTRL + 3) & 0x80) &&
 		       (tmpidx < 100))
 			tmpidx++;
 		if (tmpidx < 100)

--
2.1.4