Staging: vt6655: Remove unnecessary equality checks in rxtx.c
PATCH 1/1 Staging: vt6655: Remove unnecessary equality checks in rxtx.c
Modified the if-else statements to remove unnecessary comparisons in rxtx.c. 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
@@ -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
PATCH 1/1 Staging: vt6655: Remove unnecessary equality checks in rxtx.c
Modified the if-else statements to remove unnecessary comparisons in rxtx.c. 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 +1 -1
@@ -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);
--
1.7.9.5
[email protected]
maintainerQuoted 7 lines · Sharvari (S.)
Modified the if-else statements to remove unnecessary comparisons in
rxtx.c. This change was detected with the help of coccinelle toolSigned-off-by Harisangam Sharvari <[email protected]>--- drivers/staging/vt6655/rxtx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Why did you resend this with a forward?
Which one should I take?
I'm going to drop both as I don't know what to do, please resend the one you wish to have applied.
thanks,
greg k-h
PATCH 1/1 Staging: vt6655: Remove unnecessary equality checks in rxtx.c
In reply to Harisangam, Sharvari (S.)From: Sharvari Harisangam <[email protected]>
Modified the if-else statements to remove unnecessary comparisons in rxtx.c. 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 +1 -1
@@ -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);
--
1.7.9.5
[email protected]
maintainerQuoted 9 lines · Sharvari (S.)
From: Sharvari Harisangam <[email protected]>
Modified the if-else statements to remove unnecessary comparisons in
rxtx.c. This change was detected with the help of coccinelle toolSigned-off-by Sharvari Harisangam <[email protected]>--- drivers/staging/vt6655/rxtx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
This patch can not be applied to my tree :(
Please fix it up and resend.