qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 0/3] softmmu: some space-style problems while coding


From: chaihaoyu
Subject: [PATCH v2 0/3] softmmu: some space-style problems while coding
Date: Tue, 3 Nov 2020 12:16:45 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

Hi, recently I found some code style problems while using checkpatch.pl 
tool,please review.

Date: Tue, 3 Nov 2020 11:19:37 +0800
Subject: [PATCH] space style
signed-off-by: Haoyu Chai<chaihaoyu1@huawei.com>
---
 softmmu/physmem.c      |  2 +-
 softmmu/qdev-monitor.c |  4 ++--
 softmmu/vl.c           | 12 ++++++------
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index 78c1b6580a..44b068ee85 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -3457,7 +3457,7 @@ int qemu_target_page_bits_min(void)

 bool cpu_physical_memory_is_io(hwaddr phys_addr)
 {
-    MemoryRegion*mr;
+    MemoryRegion *mr;
     hwaddr l = 1;
     bool res;

diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c
index e283d9c9c0..c2b218adce 100644
--- a/softmmu/qdev-monitor.c
+++ b/softmmu/qdev-monitor.c
@@ -500,7 +500,7 @@ static BusState *qbus_find(const char *path, Error **errp)
         }

         /* find device */
-        if (sscanf(path+pos, "%127[^/]%n", elem, &len) != 1) {
+        if (sscanf(path + pos, "%127[^/]%n", elem, &len) != 1) {
             g_assert_not_reached();
             elem[0] = len = 0;
         }
@@ -535,7 +535,7 @@ static BusState *qbus_find(const char *path, Error **errp)
         }

         /* find bus */
-        if (sscanf(path+pos, "%127[^/]%n", elem, &len) != 1) {
+        if (sscanf(path + pos, "%127[^/]%n", elem, &len) != 1) {
             g_assert_not_reached();
             elem[0] = len = 0;
         }
diff --git a/softmmu/vl.c b/softmmu/vl.c
index c4667d91fe..d37520a356 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -2418,7 +2418,7 @@ static const QEMUOption *lookup_opt(int argc, char **argv,
         r++;
     }
     popt = qemu_options;
-    for(;;) {
+    for (;;) {
         if (!popt->name) {
             error_report("invalid option");
             exit(1);
@@ -3008,7 +3008,7 @@ void qemu_init(int argc, char **argv, char **envp)

     /* second pass of option parsing */
     optind = 1;
-    for(;;) {
+    for (;;) {
         if (optind >= argc) {
             break;
         }
@@ -3023,7 +3023,7 @@ void qemu_init(int argc, char **argv, char **envp)
                 error_report("Option not supported for this target");
                 exit(1);
             }
-            switch(popt->index) {
+            switch (popt->index) {
             case QEMU_OPTION_cpu:
                 /* hw initialization will check this */
                 cpu_option = optarg;
@@ -3182,13 +3182,13 @@ void qemu_init(int argc, char **argv, char **envp)
 #endif
             case QEMU_OPTION_audio_help:
                 audio_legacy_help();
-                exit (0);
+                exit(0);
                 break;
             case QEMU_OPTION_audiodev:
                 audio_parse_option(optarg);
                 break;
             case QEMU_OPTION_soundhw:
-                select_soundhw (optarg);
+                select_soundhw(optarg);
                 break;
             case QEMU_OPTION_h:
                 help(0);
@@ -4323,7 +4323,7 @@ void qemu_init(int argc, char **argv, char **envp)
     if (watchdog) {
         i = select_watchdog(watchdog);
         if (i > 0)
-            exit (i == 1 ? 1 : 0);
+            exit(i == 1 ? 1 : 0);
     }

     /* This checkpoint is required by replay to separate prior clock
-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]