@@ -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;
@@ -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);
@@ -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;
@@ -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);
@@ -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;
}
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(-)