diff mbox series

[12/18] ACPI: use semicolons rather than commas to separate statements

Message ID 1601233948-11629-13-git-send-email-Julia.Lawall@inria.fr
State New
Headers show
Series None | expand

Commit Message

Julia Lawall Sept. 27, 2020, 7:12 p.m. UTC
Replace commas with semicolons.  What is done is essentially described by
the following Coccinelle semantic patch (http://coccinelle.lip6.fr/):

// <smpl>
@@ expression e1,e2; @@
e1
-,
+;
e2
... when any
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/acpi/processor_idle.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Christophe JAILLET Sept. 27, 2020, 8:27 p.m. UTC | #1
Le 27/09/2020 à 21:12, Julia Lawall a écrit :
> Replace commas with semicolons.  What is done is essentially described by
> the following Coccinelle semantic patch (http://coccinelle.lip6.fr/):
> 
> // <smpl>
> @@ expression e1,e2; @@
> e1
> -,
> +;
> e2
> ... when any
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
> 
> ---
>   drivers/acpi/processor_idle.c |    4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index f66236cff69b..85502143f506 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -1077,7 +1077,9 @@ static int acpi_processor_get_lpi_info(struct acpi_processor *pr)
>   		/* flatten all the LPI states in this level of hierarchy */
>   		flatten_lpi_states(pr, curr, prev);
>   
> -		tmp = prev, prev = curr, curr = tmp;
> +		tmp = prev;
> +		prev = curr;
> +		curr = tmp;
>   
>   		status = acpi_get_parent(handle, &pr_ahandle);
>   	}
> 
> 
swap(prev, curr)?

CJ
diff mbox series

Patch

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index f66236cff69b..85502143f506 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1077,7 +1077,9 @@  static int acpi_processor_get_lpi_info(struct acpi_processor *pr)
 		/* flatten all the LPI states in this level of hierarchy */
 		flatten_lpi_states(pr, curr, prev);
 
-		tmp = prev, prev = curr, curr = tmp;
+		tmp = prev;
+		prev = curr;
+		curr = tmp;
 
 		status = acpi_get_parent(handle, &pr_ahandle);
 	}