diff mbox

[OPW,kernel,3/6] staging: rtl8187se: bool tests don't need comparisons

Message ID 1382645851-928-4-git-send-email-teobaluta@gmail.com
State New, archived
Headers show

Commit Message

Teodora Baluta Oct. 24, 2013, 8:17 p.m. UTC
This patch fixes the following coccinelle warning:

drivers/staging/rtl8187se/r8180_core.c:2217:5-40: WARNING: Comparison to bool

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
---
 drivers/staging/rtl8187se/r8180_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rusty Russell Oct. 25, 2013, 1 a.m. UTC | #1
Teodora Baluta <teobaluta@gmail.com> writes:

> This patch fixes the following coccinelle warning:
>
> drivers/staging/rtl8187se/r8180_core.c:2217:5-40: WARNING: Comparison to bool
>
> Signed-off-by: Teodora Baluta <teobaluta@gmail.com>

(Another potential patch would be to define a temporary variable "struct
net_device *dev = (struct net_device *)data" to neaten that function).

Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>

Cheers,
Rusty.

> ---
>  drivers/staging/rtl8187se/r8180_core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
> index eb98222..8d767f3 100644
> --- a/drivers/staging/rtl8187se/r8180_core.c
> +++ b/drivers/staging/rtl8187se/r8180_core.c
> @@ -2214,7 +2214,7 @@ static void watch_dog_adaptive(unsigned long data)
>  		TxPwrTracking87SE((struct net_device *)data);
>  
>  	/* Perform DIG immediately. */
> -	if (CheckDig((struct net_device *)data) == true)
> +	if (CheckDig((struct net_device *)data))
>  		queue_work(priv->ieee80211->wq, (void *)&priv->ieee80211->hw_dig_wq);
>  	rtl8180_watch_dog((struct net_device *)data);
>  
> -- 
> 1.7.10.4
>
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
diff mbox

Patch

diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index eb98222..8d767f3 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -2214,7 +2214,7 @@  static void watch_dog_adaptive(unsigned long data)
 		TxPwrTracking87SE((struct net_device *)data);
 
 	/* Perform DIG immediately. */
-	if (CheckDig((struct net_device *)data) == true)
+	if (CheckDig((struct net_device *)data))
 		queue_work(priv->ieee80211->wq, (void *)&priv->ieee80211->hw_dig_wq);
 	rtl8180_watch_dog((struct net_device *)data);