diff mbox

[2/3] hw/arm/exynos: Declare local variables in some order

Message ID 20170506152414.8704-3-krzk@kernel.org
State New
Headers show

Commit Message

Krzysztof Kozlowski May 6, 2017, 3:24 p.m. UTC
Bring some more readability by declaring local function variables, first
initialized ones and then the rest (with reversed-christmas-tree order).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 hw/arm/exynos4210.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé May 6, 2017, 4:06 p.m. UTC | #1
Aesthetic.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

On 05/06/2017 12:24 PM, Krzysztof Kozlowski wrote:
> Bring some more readability by declaring local function variables, first
> initialized ones and then the rest (with reversed-christmas-tree order).
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  hw/arm/exynos4210.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c
> index 0da877f8db0a..27a7bf28a5a9 100644
> --- a/hw/arm/exynos4210.c
> +++ b/hw/arm/exynos4210.c
> @@ -162,12 +162,12 @@ static uint64_t exynos4210_calc_affinity(int cpu)
>
>  Exynos4210State *exynos4210_init(MemoryRegion *system_mem)
>  {
> -    int i, n;
>      Exynos4210State *s = g_new(Exynos4210State, 1);
>      qemu_irq gate_irq[EXYNOS4210_NCPUS][EXYNOS4210_IRQ_GATE_NINPUTS];
> -    DeviceState *dev;
>      SysBusDevice *busdev;
>      ObjectClass *cpu_oc;
> +    DeviceState *dev;
> +    int i, n;
>
>      cpu_oc = cpu_class_by_name(TYPE_ARM_CPU, "cortex-a9");
>      assert(cpu_oc);
>
diff mbox

Patch

diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c
index 0da877f8db0a..27a7bf28a5a9 100644
--- a/hw/arm/exynos4210.c
+++ b/hw/arm/exynos4210.c
@@ -162,12 +162,12 @@  static uint64_t exynos4210_calc_affinity(int cpu)
 
 Exynos4210State *exynos4210_init(MemoryRegion *system_mem)
 {
-    int i, n;
     Exynos4210State *s = g_new(Exynos4210State, 1);
     qemu_irq gate_irq[EXYNOS4210_NCPUS][EXYNOS4210_IRQ_GATE_NINPUTS];
-    DeviceState *dev;
     SysBusDevice *busdev;
     ObjectClass *cpu_oc;
+    DeviceState *dev;
+    int i, n;
 
     cpu_oc = cpu_class_by_name(TYPE_ARM_CPU, "cortex-a9");
     assert(cpu_oc);