* [PATCH 39/42] drivers/mfd: Adjust confusing if indentation
@ 2010-08-05 20:28 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2010-08-05 20:28 UTC (permalink / raw)
To: Samuel Ortiz, linux-kernel, kernel-janitors
From: Julia Lawall <julia@diku.dk>
Move the call to twl4030_config_sleep_sequence into the if branch that it
is aligned with.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@
(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)
@script:python@
p1 << r.p1;
p2 << r.p2;
@@
if (p1[0].column == p2[0].column):
cocci.print_main("branch",p1)
cocci.print_secs("after",p2)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
This patch changes the semantics, and might not be what is intended.
drivers/mfd/twl4030-power.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 7efa878..9ab5a20 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -451,12 +451,13 @@ static int __init load_twl4030_script(struct twl4030_script *tscript,
if (err)
goto out;
}
- if (tscript->flags & TWL4030_SLEEP_SCRIPT)
+ if (tscript->flags & TWL4030_SLEEP_SCRIPT) {
if (order)
pr_warning("TWL4030: Bad order of scripts (sleep "\
"script before wakeup) Leads to boot"\
"failure on some boards\n");
err = twl4030_config_sleep_sequence(address);
+ }
out:
return err;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-05 20:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-05 20:28 [PATCH 39/42] drivers/mfd: Adjust confusing if indentation Julia Lawall
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).