[Qemu-devel] [RFC for-4.1 19/25] target/ppc: Style fixes for monitor.c

David Gibson posted 25 patches 6 years, 10 months ago
Maintainers: Alex Williamson <alex.williamson@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, "Hervé Poussineau" <hpoussin@reactos.org>
[Qemu-devel] [RFC for-4.1 19/25] target/ppc: Style fixes for monitor.c
Posted by David Gibson 6 years, 10 months ago
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 target/ppc/monitor.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/target/ppc/monitor.c b/target/ppc/monitor.c
index 04deec8030..451ca722b3 100644
--- a/target/ppc/monitor.c
+++ b/target/ppc/monitor.c
@@ -27,32 +27,33 @@
 #include "monitor/hmp-target.h"
 #include "hmp.h"
 
-static target_long monitor_get_ccr (const struct MonitorDef *md, int val)
+static target_long monitor_get_ccr(const struct MonitorDef *md, int val)
 {
     CPUArchState *env = mon_get_cpu_env();
     unsigned int u;
     int i;
 
     u = 0;
-    for (i = 0; i < 8; i++)
+    for (i = 0; i < 8; i++) {
         u |= env->crf[i] << (32 - (4 * (i + 1)));
+    }
 
     return u;
 }
 
-static target_long monitor_get_decr (const struct MonitorDef *md, int val)
+static target_long monitor_get_decr(const struct MonitorDef *md, int val)
 {
     CPUArchState *env = mon_get_cpu_env();
     return cpu_ppc_load_decr(env);
 }
 
-static target_long monitor_get_tbu (const struct MonitorDef *md, int val)
+static target_long monitor_get_tbu(const struct MonitorDef *md, int val)
 {
     CPUArchState *env = mon_get_cpu_env();
     return cpu_ppc_load_tbu(env);
 }
 
-static target_long monitor_get_tbl (const struct MonitorDef *md, int val)
+static target_long monitor_get_tbl(const struct MonitorDef *md, int val)
 {
     CPUArchState *env = mon_get_cpu_env();
     return cpu_ppc_load_tbl(env);
@@ -66,7 +67,7 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict)
         monitor_printf(mon, "No CPU available\n");
         return;
     }
-    dump_mmu((FILE*)mon, (fprintf_function)monitor_printf, env1);
+    dump_mmu((FILE *)mon, (fprintf_function)monitor_printf, env1);
 }
 
 const MonitorDef monitor_defs[] = {
-- 
2.20.1


Re: [Qemu-devel] [RFC for-4.1 19/25] target/ppc: Style fixes for monitor.c
Posted by Cédric Le Goater 6 years, 10 months ago
On 3/22/19 1:15 AM, David Gibson wrote:
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.

> ---
>  target/ppc/monitor.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/target/ppc/monitor.c b/target/ppc/monitor.c
> index 04deec8030..451ca722b3 100644
> --- a/target/ppc/monitor.c
> +++ b/target/ppc/monitor.c
> @@ -27,32 +27,33 @@
>  #include "monitor/hmp-target.h"
>  #include "hmp.h"
>  
> -static target_long monitor_get_ccr (const struct MonitorDef *md, int val)
> +static target_long monitor_get_ccr(const struct MonitorDef *md, int val)
>  {
>      CPUArchState *env = mon_get_cpu_env();
>      unsigned int u;
>      int i;
>  
>      u = 0;
> -    for (i = 0; i < 8; i++)
> +    for (i = 0; i < 8; i++) {
>          u |= env->crf[i] << (32 - (4 * (i + 1)));
> +    }
>  
>      return u;
>  }
>  
> -static target_long monitor_get_decr (const struct MonitorDef *md, int val)
> +static target_long monitor_get_decr(const struct MonitorDef *md, int val)
>  {
>      CPUArchState *env = mon_get_cpu_env();
>      return cpu_ppc_load_decr(env);
>  }
>  
> -static target_long monitor_get_tbu (const struct MonitorDef *md, int val)
> +static target_long monitor_get_tbu(const struct MonitorDef *md, int val)
>  {
>      CPUArchState *env = mon_get_cpu_env();
>      return cpu_ppc_load_tbu(env);
>  }
>  
> -static target_long monitor_get_tbl (const struct MonitorDef *md, int val)
> +static target_long monitor_get_tbl(const struct MonitorDef *md, int val)
>  {
>      CPUArchState *env = mon_get_cpu_env();
>      return cpu_ppc_load_tbl(env);
> @@ -66,7 +67,7 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict)
>          monitor_printf(mon, "No CPU available\n");
>          return;
>      }
> -    dump_mmu((FILE*)mon, (fprintf_function)monitor_printf, env1);
> +    dump_mmu((FILE *)mon, (fprintf_function)monitor_printf, env1);
>  }
>  
>  const MonitorDef monitor_defs[] = {
>