linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: vt6655: Remove unnecessary equality checks for a bool variable
@ 2015-05-25 12:22 Harisangam, Sharvari (S.)
  2015-05-26  5:05 ` Sudip Mukherjee
  0 siblings, 1 reply; 7+ messages in thread
From: Harisangam, Sharvari (S.) @ 2015-05-25 12:22 UTC (permalink / raw)
  To: forest, gregkh, tvboxspy, gclement, haticeerturk27, mahfouz.saif.elyazal
  Cc: devel, linux-kernel

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

Signed-off-by: Harisangam Sharvari S <sharisan@visteon.com>
---
 drivers/staging/vt6655/rxtx.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 7468776..7fedde3 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] Staging: vt6655: Remove unnecessary equality checks for a bool variable
  2015-05-25 12:22 [PATCH] Staging: vt6655: Remove unnecessary equality checks for a bool variable Harisangam, Sharvari (S.)
@ 2015-05-26  5:05 ` Sudip Mukherjee
  2015-05-27 12:07   ` Harisangam, Sharvari (S.)
  0 siblings, 1 reply; 7+ messages in thread
From: Sudip Mukherjee @ 2015-05-26  5:05 UTC (permalink / raw)
  To: Harisangam, Sharvari (S.)
  Cc: forest, gregkh, tvboxspy, gclement, haticeerturk27,
	mahfouz.saif.elyazal, devel, linux-kernel

On Mon, May 25, 2015 at 12:22:25PM +0000, Harisangam, Sharvari (S.) wrote:
> Modified the if-else statements to remove unnecessary comparisons.
> This change was detected with the help of coccinelle tool
> 
> Signed-off-by: Harisangam Sharvari S <sharisan@visteon.com>
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Staging: vt6655: Remove unnecessary equality checks for a bool variable
  2015-05-26  5:05 ` Sudip Mukherjee
@ 2015-05-27 12:07   ` Harisangam, Sharvari (S.)
  2015-05-28  5:10     ` Sudip Mukherjee
  0 siblings, 1 reply; 7+ messages in thread
From: Harisangam, Sharvari (S.) @ 2015-05-27 12:07 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: forest, gregkh, tvboxspy, gclement, haticeerturk27,
	mahfouz.saif.elyazal, devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 573 bytes --]

On Tue, May 26, 2015 at 10:35:57AM +0530, Sudip Mukherjee wrote:
> On Mon, May 25, 2015 at 12:22:25PM +0000, Harisangam, Sharvari (S.) wrote:
> > Modified the if-else statements to remove unnecessary comparisons.
> > This change was detected with the help of coccinelle tool
> > 
> > Signed-off-by: Harisangam Sharvari S <sharisan@visteon.com>
> 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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Staging-vt6655-Remove-unnecessary-equality-checks-fo.patch --]
[-- Type: text/x-diff; name="0001-Staging-vt6655-Remove-unnecessary-equality-checks-fo.patch", Size: 2716 bytes --]

From 822045c4d3c28d36b8a540520a48795fec4c7eff Mon Sep 17 00:00:00 2001
From: Harisangam Sharvari <sharisan@visteon.com>
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

Signed-off-by: Harisangam Sharvari <sharisan@visteon.com>
---
 drivers/staging/vt6655/rxtx.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 7468776..7fedde3 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] Staging: vt6655: Remove unnecessary equality checks for a bool variable
  2015-05-27 12:07   ` Harisangam, Sharvari (S.)
@ 2015-05-28  5:10     ` Sudip Mukherjee
  0 siblings, 0 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-05-28  5:10 UTC (permalink / raw)
  To: Harisangam, Sharvari (S.)
  Cc: forest, gregkh, tvboxspy, gclement, haticeerturk27,
	mahfouz.saif.elyazal, devel, linux-kernel

On Wed, May 27, 2015 at 12:07:06PM +0000, Harisangam, Sharvari (S.) wrote:
> On Tue, May 26, 2015 at 10:35:57AM +0530, Sudip Mukherjee wrote:
> > On Mon, May 25, 2015 at 12:22:25PM +0000, Harisangam, Sharvari (S.) wrote:
> > > Modified the if-else statements to remove unnecessary comparisons.
> > > This change was detected with the help of coccinelle tool
> > > 
> > > Signed-off-by: Harisangam Sharvari S <sharisan@visteon.com>
> > 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
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Staging: vt6655: Remove unnecessary equality checks for a bool variable
  2015-05-28  6:10 Harisangam, Sharvari (S.)
  2015-05-28  8:15 ` Joe Perches
@ 2015-05-31  1:32 ` gregkh
  1 sibling, 0 replies; 7+ messages in thread
From: gregkh @ 2015-05-31  1:32 UTC (permalink / raw)
  To: Harisangam, Sharvari (S.)
  Cc: forest, tvboxspy, gclement, haticeerturk27, mahfouz.saif.elyazal,
	devel, linux-kernel

On Thu, May 28, 2015 at 06:10:26AM +0000, Harisangam, Sharvari (S.) wrote:
> Modified the if-else statements to remove unnecessary comparisons.
> This change was detected with the help of coccinelle tool
> 
> Signed-off-by: Harisangam Sharvari <sharisan@visteon.com>

Name doesn't match...



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Staging: vt6655: Remove unnecessary equality checks for a bool variable
  2015-05-28  6:10 Harisangam, Sharvari (S.)
@ 2015-05-28  8:15 ` Joe Perches
  2015-05-31  1:32 ` gregkh
  1 sibling, 0 replies; 7+ messages in thread
From: Joe Perches @ 2015-05-28  8:15 UTC (permalink / raw)
  To: Harisangam, Sharvari (S.)
  Cc: forest, gregkh, tvboxspy, gclement, haticeerturk27,
	mahfouz.saif.elyazal, devel, linux-kernel

On Thu, 2015-05-28 at 06:10 +0000, Harisangam, Sharvari (S.) wrote:
> Modified the if-else statements to remove unnecessary comparisons.
> This change was detected with the help of coccinelle tool

Your commit subject implies you are doing this for the
directory, not a single file.

If you are going to do this, please do it for all files
in the directory.  

$ git grep  -w -E "if\s*\(.*(true|false)" drivers/staging/vt6655/
drivers/staging/vt6655/card.c:  if (pDevice->bRadioOff == true)
drivers/staging/vt6655/card.c:  if (pDevice->bRadioControlOff == true) {
drivers/staging/vt6655/card.c:          if (pDevice->bHWRadioOff == true)
drivers/staging/vt6655/card.c:          if (pDevice->bRadioControlOff == true)
drivers/staging/vt6655/card.c:  if (pDevice->bRadioOff == false) {
drivers/staging/vt6655/rxtx.c:                  if (bRTS == true) {/* RTS_need */
drivers/staging/vt6655/rxtx.c:                  if (bRTS == true) {/* RTS_need */
drivers/staging/vt6655/rxtx.c:                  if (bRTS == true) {
drivers/staging/vt6655/rxtx.c:                  if (bRTS == true) { /* RTS_need */



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] Staging: vt6655: Remove unnecessary equality checks for a bool variable
@ 2015-05-28  6:10 Harisangam, Sharvari (S.)
  2015-05-28  8:15 ` Joe Perches
  2015-05-31  1:32 ` gregkh
  0 siblings, 2 replies; 7+ messages in thread
From: Harisangam, Sharvari (S.) @ 2015-05-28  6:10 UTC (permalink / raw)
  To: forest, gregkh, tvboxspy, gclement, haticeerturk27, mahfouz.saif.elyazal
  Cc: devel, linux-kernel

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

Signed-off-by: Harisangam Sharvari <sharisan@visteon.com>
---
 drivers/staging/vt6655/rxtx.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 7468776..7fedde3 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-31  2:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-25 12:22 [PATCH] Staging: vt6655: Remove unnecessary equality checks for a bool variable Harisangam, Sharvari (S.)
2015-05-26  5:05 ` Sudip Mukherjee
2015-05-27 12:07   ` Harisangam, Sharvari (S.)
2015-05-28  5:10     ` Sudip Mukherjee
2015-05-28  6:10 Harisangam, Sharvari (S.)
2015-05-28  8:15 ` Joe Perches
2015-05-31  1:32 ` gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).