From: chaihaoyu <chaihaoyu1@huawei.com>
To: <qemu-devel@nongnu.org>, <pbonzini@redhat.com>
Cc: alex.chen@huawei.com, hunongda@huawei.com,
zhang.zhanghailiang@huawei.com
Subject: [PATCH v2 0/3] softmmu: some space-style problems while coding
Date: Tue, 3 Nov 2020 12:16:45 +0800 [thread overview]
Message-ID: <f97efd59-6d7b-3e85-b13a-20eff7a2d78a@huawei.com> (raw)
In-Reply-To: <edcc3e56-2419-8645-8639-d9e50d710a1d@huawei.com>
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
--
next prev parent reply other threads:[~2020-11-03 4:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 14:25 [PATCH] spaces are required in some places chaihaoyu
2020-10-29 15:04 ` no-reply
2020-11-03 4:06 ` [PATCH v2 1/3] softmmu: Do not use C99 // comments chaihaoyu
2020-11-03 4:09 ` [PATCH v2 2/3] softmmu: Don't use '#' flag of printf format chaihaoyu
2020-11-03 4:12 ` [PATCH v2 3/3] softmmu: braces {} are necessary for all arms of this statement chaihaoyu
2020-11-03 4:16 ` chaihaoyu [this message]
2020-11-03 6:24 ` [PATCH v2 1/3] softmmu: Do not use C99 // comments Markus Armbruster
2020-11-04 7:49 ` chaihaoyu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f97efd59-6d7b-3e85-b13a-20eff7a2d78a@huawei.com \
--to=chaihaoyu1@huawei.com \
--cc=alex.chen@huawei.com \
--cc=hunongda@huawei.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhang.zhanghailiang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).