* [PATCH] staging: rtl8723bs: Simplify boolean expression
@ 2019-10-18 3:59 Javier F. Arias
2019-10-18 6:28 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Javier F. Arias @ 2019-10-18 3:59 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
Simplify expression that it's inverting a boolean value.
Issue found by Coccinelle.
Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
---
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
index c514cb735afd..38e7160e6da9 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
@@ -188,7 +188,7 @@ void rtl8723b_HalDmWatchDog(struct adapter *Adapter)
bBtDisabled = hal_btcoex_IsBtDisabled(Adapter);
- ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_BT_ENABLED, ((bBtDisabled == true)?false:true));
+ ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_BT_ENABLED, !(bBtDisabled));
ODM_DMWatchdog(&pHalData->odmpriv);
}
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: Simplify boolean expression
2019-10-18 3:59 [PATCH] staging: rtl8723bs: Simplify boolean expression Javier F. Arias
@ 2019-10-18 6:28 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2019-10-18 6:28 UTC (permalink / raw)
To: Javier F. Arias; +Cc: gregkh, outreachy-kernel
On Thu, 17 Oct 2019, Javier F. Arias wrote:
> Simplify expression that it's inverting a boolean value.
> Issue found by Coccinelle.
>
> Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
> ---
> drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
> index c514cb735afd..38e7160e6da9 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
> @@ -188,7 +188,7 @@ void rtl8723b_HalDmWatchDog(struct adapter *Adapter)
>
> bBtDisabled = hal_btcoex_IsBtDisabled(Adapter);
>
> - ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_BT_ENABLED, ((bBtDisabled == true)?false:true));
> + ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_BT_ENABLED, !(bBtDisabled));
This looks really helpful to improve readability.
At the same time, could you remove the () around bBtDisabled?
And make a series where in the other patch you address the 80 character
issue. Then this code will look nice overall.
thanks,
julia
>
> ODM_DMWatchdog(&pHalData->odmpriv);
> }
> --
> 2.20.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20191018035912.GA5198%40gmail.com.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-18 6:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-18 3:59 [PATCH] staging: rtl8723bs: Simplify boolean expression Javier F. Arias
2019-10-18 6:28 ` [Outreachy kernel] " Julia Lawall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.