Skip to contentSkip to conversation

Staging: vt6655: Remove unnecessary equality checks for a bool variable

PATCH In review Harisangam, Sharvari (S.) 2 participants 4 messages May 25, 2015 – May 28, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: vt6655: Remove unnecessary equality checks for a bool variable

Modified the if-else statements to remove unnecessary comparisons. This change was detected with the help of coccinelle tool

---
 drivers/staging/vt6655/rxtx.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/vt6655/rxtx.c +4 -4
index 7468776..7fedde3 100644
@@ -1093,7 +1093,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
 	if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {/* 802.11g packet */
 
 		if (byFBOption == AUTO_FB_NONE) {
-			if (bRTS == true) {/* RTS_need */
+			if (bRTS) {/* RTS_need */
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts));
 				pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
@@ -1115,7 +1115,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
 			}
 		} else {
 			/* Auto Fall Back */
-			if (bRTS == true) {/* RTS_need */
+			if (bRTS) {/* RTS_need */
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts));
 				pvRTS = (void *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
@@ -1138,7 +1138,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
 	} else {/* 802.11a/b packet */
 
 		if (byFBOption == AUTO_FB_NONE) {
-			if (bRTS == true) {
+			if (bRTS) {
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab));
 				pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
@@ -1158,7 +1158,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
 			}
 		} else {
 			/* Auto Fall Back */
-			if (bRTS == true) { /* RTS_need */
+			if (bRTS) { /* RTS_need */
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab));
 				pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 4 lines · Sharvari (S.)

Modified the if-else statements to remove unnecessary comparisons. This change was detected with the help of coccinelle tool

you should not use initials in the Signed-off-by name. This should be the name which you usually use to sign any legal document.

regards
sudip

#2 lore raw
Quoted 10 lines · Sudip Mukherjee
Quoted 4 lines · Sharvari (S.)

Modified the if-else statements to remove unnecessary comparisons. This change was detected with the help of coccinelle tool

you should not use initials in the Signed-off-by name. This should be the name which you usually use to sign any legal document.

regards
sudip

The signed off name is now changed .

-Sharvari Harisangam

From 822045c4d3c28d36b8a540520a48795fec4c7eff Mon Sep 17 00:00:00 2001
From: Harisangam Sharvari <[email protected]>
Date: Mon, 25 May 2015 15:42:43 +0530
Subject: [PATCH] Staging: vt6655: Remove unnecessary equality checks for a
bool variable

Modified the if-else statements to remove unnecessary comparisons. This change was detected with the help of coccinelle tool

---
 drivers/staging/vt6655/rxtx.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/vt6655/rxtx.c +4 -4
index 7468776..7fedde3 100644
@@ -1093,7 +1093,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
 	if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {/* 802.11g packet */
 
 		if (byFBOption == AUTO_FB_NONE) {
-			if (bRTS == true) {/* RTS_need */
+			if (bRTS) {/* RTS_need */
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts));
 				pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
@@ -1115,7 +1115,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
 			}
 		} else {
 			/* Auto Fall Back */
-			if (bRTS == true) {/* RTS_need */
+			if (bRTS) {/* RTS_need */
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts));
 				pvRTS = (void *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
@@ -1138,7 +1138,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
 	} else {/* 802.11a/b packet */
 
 		if (byFBOption == AUTO_FB_NONE) {
-			if (bRTS == true) {
+			if (bRTS) {
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab));
 				pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
@@ -1158,7 +1158,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
 			}
 		} else {
 			/* Auto Fall Back */
-			if (bRTS == true) { /* RTS_need */
+			if (bRTS) { /* RTS_need */
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab));
 				pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
Signature · 1 line
1.7.9.5
#3 lore raw
Quoted 5 lines · Sharvari (S.)
Quoted 4 lines · Sudip Mukherjee
Quoted 3 lines · Sharvari (S.)

Modified the if-else statements to remove unnecessary comparisons. This change was detected with the help of coccinelle tool

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

you should not use initials in the Signed-off-by name. This should be the name which you usually use to sign any legal document.

regards
sudip

The signed off name is now changed .

thanks, but now you have sent it as an attachment which Greg can not apply.

can you please resend it once again (not as attachment).

regards
sudip

Quoted 1 line