diff mbox series

[02/10] hw/core/:split some lines containing more than 80 characters

Message ID 20201019203023.658555-3-ganqixin@huawei.com (mailing list archive)
State New, archived
Headers show
Series Fix line over 80 characters warning | expand

Commit Message

Gan Qixin Oct. 19, 2020, 8:30 p.m. UTC
By using scripts/checkpatch.pl, it is found that many files in hw/core/
contain lines with more than 80 characters.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
---
 hw/core/bus.c                    |  3 ++-
 hw/core/loader.c                 | 17 +++++++++++------
 hw/core/machine-hmp-cmds.c       |  6 ++++--
 hw/core/machine.c                |  3 ++-
 hw/core/qdev-properties-system.c |  4 ++--
 5 files changed, 21 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/hw/core/bus.c b/hw/core/bus.c
index a0483859ae..9b2dc7e25c 100644
--- a/hw/core/bus.c
+++ b/hw/core/bus.c
@@ -158,7 +158,8 @@  void qbus_create_inplace(void *bus, size_t size, const char *typename,
     qbus_init(bus, parent, name);
 }
 
-BusState *qbus_create(const char *typename, DeviceState *parent, const char *name)
+BusState *qbus_create(const char *typename, DeviceState *parent,
+                      const char *name)
 {
     BusState *bus;
 
diff --git a/hw/core/loader.c b/hw/core/loader.c
index 8bbb1797a4..50839d93e3 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -211,14 +211,18 @@  static void bswap_ahdr(struct exec *e)
 #define N_TXTOFF(x)							\
     (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) :	\
      (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec)))
-#define N_TXTADDR(x, target_page_size) (N_MAGIC(x) == QMAGIC ? target_page_size : 0)
-#define _N_SEGMENT_ROUND(x, target_page_size) (((x) + target_page_size - 1) & ~(target_page_size - 1))
+#define N_TXTADDR(x, target_page_size) \
+    (N_MAGIC(x) == QMAGIC ? target_page_size : 0)
+#define _N_SEGMENT_ROUND(x, target_page_size) \
+    (((x) + target_page_size - 1) & ~(target_page_size - 1))
 
-#define _N_TXTENDADDR(x, target_page_size) (N_TXTADDR(x, target_page_size)+(x).a_text)
+#define _N_TXTENDADDR(x, target_page_size) \
+    (N_TXTADDR(x, target_page_size) + (x).a_text)
 
 #define N_DATADDR(x, target_page_size) \
-    (N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x, target_page_size)) \
-     : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x, target_page_size), target_page_size)))
+    (N_MAGIC(x) == OMAGIC ? (_N_TXTENDADDR(x, target_page_size)) \
+     : (_N_SEGMENT_ROUND(_N_TXTENDADDR(x, target_page_size), \
+    target_page_size)))
 
 
 int load_aout(const char *filename, hwaddr addr, int max_sz,
@@ -1190,7 +1194,8 @@  int rom_check_and_register_reset(void)
         }
         section = memory_region_find(rom->mr ? rom->mr : get_system_memory(),
                                      rom->addr, 1);
-        rom->isrom = int128_nz(section.size) && memory_region_is_rom(section.mr);
+        rom->isrom = int128_nz(section.size)
+                     && memory_region_is_rom(section.mr);
         memory_region_unref(section.mr);
     }
     qemu_register_reset(rom_reset, NULL);
diff --git a/hw/core/machine-hmp-cmds.c b/hw/core/machine-hmp-cmds.c
index 6357be9c6b..65280d53bc 100644
--- a/hw/core/machine-hmp-cmds.c
+++ b/hw/core/machine-hmp-cmds.c
@@ -73,7 +73,8 @@  void hmp_hotpluggable_cpus(Monitor *mon, const QDict *qdict)
             monitor_printf(mon, "    node-id: \"%" PRIu64 "\"\n", c->node_id);
         }
         if (c->has_socket_id) {
-            monitor_printf(mon, "    socket-id: \"%" PRIu64 "\"\n", c->socket_id);
+            monitor_printf(mon, "    socket-id: \"%" PRIu64 "\"\n",
+                           c->socket_id);
         }
         if (c->has_die_id) {
             monitor_printf(mon, "    die-id: \"%" PRIu64 "\"\n", c->die_id);
@@ -82,7 +83,8 @@  void hmp_hotpluggable_cpus(Monitor *mon, const QDict *qdict)
             monitor_printf(mon, "    core-id: \"%" PRIu64 "\"\n", c->core_id);
         }
         if (c->has_thread_id) {
-            monitor_printf(mon, "    thread-id: \"%" PRIu64 "\"\n", c->thread_id);
+            monitor_printf(mon, "    thread-id: \"%" PRIu64 "\"\n",
+                           c->thread_id);
         }
 
         l = l->next;
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 7e2f4ec08e..055473c23a 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -317,7 +317,8 @@  static char *machine_get_dt_compatible(Object *obj, Error **errp)
     return g_strdup(ms->dt_compatible);
 }
 
-static void machine_set_dt_compatible(Object *obj, const char *value, Error **errp)
+static void machine_set_dt_compatible(Object *obj,
+                                      const char *value, Error **errp)
 {
     MachineState *ms = MACHINE(obj);
 
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index 49bdd12581..c4f7170a06 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -418,8 +418,8 @@  static void set_netdev(Object *obj, Visitor *v, const char *name,
     }
 
     if (queues > MAX_QUEUE_NUM) {
-        error_setg(errp, "queues of backend '%s'(%d) exceeds QEMU limitation(%d)",
-                   str, queues, MAX_QUEUE_NUM);
+        error_setg(errp, "queues of backend '%s'(%d) exceeds"
+                   "QEMU limitation(%d)", str, queues, MAX_QUEUE_NUM);
         goto out;
     }