* [PATCH] Staging: rtl8192u: Simplify if statements
@ 2015-02-26 19:10 Ksenija Stanojevic
2015-02-26 20:02 ` [Outreachy kernel] " Julia Lawall
2015-02-26 21:47 ` Greg KH
0 siblings, 2 replies; 3+ messages in thread
From: Ksenija Stanojevic @ 2015-02-26 19:10 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Ksenija Stanojevic
This patch simplifies if conditions that contain bool variable,
using Coccinelle script:
@@
bool x;
symbol true;
@@
- x == true
+ x
Signed-off-by:Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 02707d8..2efcb20 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -2822,7 +2822,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
}
dm_initialize_txpower_tracking(dev);
- if (priv->bDcut == true) {
+ if (priv->bDcut) {
u32 i, TempCCk;
u32 tmpRegA = rtl8192_QueryBBReg(dev, rOFDM0_XATxIQImbalance, bMaskDWord);
for (i = 0; i < TxBBGainTableLength; i++) {
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: Simplify if statements
2015-02-26 19:10 [PATCH] Staging: rtl8192u: Simplify if statements Ksenija Stanojevic
@ 2015-02-26 20:02 ` Julia Lawall
2015-02-26 21:47 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2015-02-26 20:02 UTC (permalink / raw)
To: Ksenija Stanojevic; +Cc: outreachy-kernel
On Thu, 26 Feb 2015, Ksenija Stanojevic wrote:
> This patch simplifies if conditions that contain bool variable,
> using Coccinelle script:
> @@
> bool x;
> symbol true;
> @@
> - x == true
> + x
Good job on finding the symbol keyword :)
Of course you should also make rules for == false, != true and != false.
julia
> Signed-off-by:Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> ---
> drivers/staging/rtl8192u/r8192U_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index 02707d8..2efcb20 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -2822,7 +2822,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
> }
> dm_initialize_txpower_tracking(dev);
>
> - if (priv->bDcut == true) {
> + if (priv->bDcut) {
> u32 i, TempCCk;
> u32 tmpRegA = rtl8192_QueryBBReg(dev, rOFDM0_XATxIQImbalance, bMaskDWord);
> for (i = 0; i < TxBBGainTableLength; i++) {
> --
> 1.9.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 post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1424977815-7967-1-git-send-email-ksenija.stanojevic%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: Simplify if statements
2015-02-26 19:10 [PATCH] Staging: rtl8192u: Simplify if statements Ksenija Stanojevic
2015-02-26 20:02 ` [Outreachy kernel] " Julia Lawall
@ 2015-02-26 21:47 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2015-02-26 21:47 UTC (permalink / raw)
To: Ksenija Stanojevic; +Cc: outreachy-kernel
On Thu, Feb 26, 2015 at 08:10:15PM +0100, Ksenija Stanojevic wrote:
> This patch simplifies if conditions that contain bool variable,
> using Coccinelle script:
> @@
> bool x;
> symbol true;
> @@
> - x == true
> + x
>
> Signed-off-by:Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> ---
> drivers/staging/rtl8192u/r8192U_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index 02707d8..2efcb20 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -2822,7 +2822,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
> }
> dm_initialize_txpower_tracking(dev);
>
> - if (priv->bDcut == true) {
> + if (priv->bDcut) {
> u32 i, TempCCk;
> u32 tmpRegA = rtl8192_QueryBBReg(dev, rOFDM0_XATxIQImbalance, bMaskDWord);
> for (i = 0; i < TxBBGainTableLength; i++) {
This patch does not apply to my tree :(
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-26 21:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26 19:10 [PATCH] Staging: rtl8192u: Simplify if statements Ksenija Stanojevic
2015-02-26 20:02 ` [Outreachy kernel] " Julia Lawall
2015-02-26 21:47 ` Greg KH
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.