[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 1/5] softmmu: fix problems about spaces
From: |
chaihaoyu |
Subject: |
[PATCH v2 1/5] softmmu: fix problems about spaces |
Date: |
Fri, 15 Jan 2021 11:55:35 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 |
This patch fixes error messages found by checkpatch.pl:
fix problems about spaces:
Signed-off-by: Haoyu Chai <chaihaoyu1@huawei.com>
---
softmmu/bootdevice.c | 4 ++--
softmmu/memory.c | 16 ++++++++--------
softmmu/qdev-monitor.c | 4 ++--
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/softmmu/bootdevice.c b/softmmu/bootdevice.c
index add4e3d2d1..4edb80de8c 100644
--- a/softmmu/bootdevice.c
+++ b/softmmu/bootdevice.c
@@ -257,7 +257,7 @@ char *get_boot_devices_list(size_t *size)
bootpath = get_boot_device_path(i->dev, ignore_suffixes, i->suffix);
if (total) {
- list[total-1] = '\n';
+ list[total - 1] = '\n';
}
len = strlen(bootpath) + 1;
list = g_realloc(list, total + len);
@@ -269,7 +269,7 @@ char *get_boot_devices_list(size_t *size)
*size = total;
if (boot_strict && *size > 0) {
- list[total-1] = '\n';
+ list[total - 1] = '\n';
list = g_realloc(list, total + 5);
memcpy(&list[total], "HALT", 5);
*size = total + 5;
diff --git a/softmmu/memory.c b/softmmu/memory.c
index 333e1ed7b0..2d346b9de4 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -336,7 +336,7 @@ static void flatview_simplify(FlatView *view)
while (i < view->nr) {
j = i + 1;
while (j < view->nr
- && can_merge(&view->ranges[j-1], &view->ranges[j])) {
+ && can_merge(&view->ranges[j - 1], &view->ranges[j])) {
int128_addto(&view->ranges[i].addr.size,
view->ranges[j].addr.size);
++j;
}
@@ -841,8 +841,8 @@ static void address_space_update_ioeventfds(AddressSpace
*as)
ioeventfds = g_realloc(ioeventfds,
ioeventfd_max * sizeof(*ioeventfds));
}
- ioeventfds[ioeventfd_nb-1] = fr->mr->ioeventfds[i];
- ioeventfds[ioeventfd_nb-1].addr = tmp;
+ ioeventfds[ioeventfd_nb - 1] = fr->mr->ioeventfds[i];
+ ioeventfds[ioeventfd_nb - 1].addr = tmp;
}
}
}
@@ -2371,8 +2371,8 @@ void memory_region_add_eventfd(MemoryRegion *mr,
++mr->ioeventfd_nb;
mr->ioeventfds = g_realloc(mr->ioeventfds,
sizeof(*mr->ioeventfds) * mr->ioeventfd_nb);
- memmove(&mr->ioeventfds[i+1], &mr->ioeventfds[i],
- sizeof(*mr->ioeventfds) * (mr->ioeventfd_nb-1 - i));
+ memmove(&mr->ioeventfds[i + 1], &mr->ioeventfds[i],
+ sizeof(*mr->ioeventfds) * (mr->ioeventfd_nb - 1 - i));
mr->ioeventfds[i] = mrfd;
ioeventfd_update_pending |= mr->enabled;
memory_region_transaction_commit();
@@ -2404,11 +2404,11 @@ void memory_region_del_eventfd(MemoryRegion *mr,
}
}
assert(i != mr->ioeventfd_nb);
- memmove(&mr->ioeventfds[i], &mr->ioeventfds[i+1],
- sizeof(*mr->ioeventfds) * (mr->ioeventfd_nb - (i+1)));
+ memmove(&mr->ioeventfds[i], &mr->ioeventfds[i + 1],
+ sizeof(*mr->ioeventfds) * (mr->ioeventfd_nb - (i + 1)));
--mr->ioeventfd_nb;
mr->ioeventfds = g_realloc(mr->ioeventfds,
- sizeof(*mr->ioeventfds)*mr->ioeventfd_nb +
1);
+ sizeof(*mr->ioeventfds) * mr->ioeventfd_nb +
1);
ioeventfd_update_pending |= mr->enabled;
memory_region_transaction_commit();
}
diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c
index 8dc656becc..a681d6a4e8 100644
--- a/softmmu/qdev-monitor.c
+++ b/softmmu/qdev-monitor.c
@@ -501,7 +501,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;
}
@@ -536,7 +536,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;
}
--
2.29.1.59.gf9b6481aed