[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/23] contrib: Don't use '#' flag of printf format
From: |
Alex Bennée |
Subject: |
[PULL 04/23] contrib: Don't use '#' flag of printf format |
Date: |
Thu, 18 Feb 2021 09:46:47 +0000 |
From: zhouyang <zhouyang789@huawei.com>
I am reading contrib related code and found some style problems while
check the code using checkpatch.pl. This commit fixs the misuse of
'#' flag of printf format
Signed-off-by: zhouyang <zhouyang789@huawei.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210118031004.1662363-2-zhouyang789@huawei.com>
Message-Id: <20210213130325.14781-5-alex.bennee@linaro.org>
diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c
index 37435a3fc7..4b08340143 100644
--- a/contrib/plugins/hotblocks.c
+++ b/contrib/plugins/hotblocks.c
@@ -63,7 +63,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)
for (i = 0; i < limit && it->next; i++, it = it->next) {
ExecCount *rec = (ExecCount *) it->data;
- g_string_append_printf(report, "%#016"PRIx64", %d, %ld,
%"PRId64"\n",
+ g_string_append_printf(report, "0x%016"PRIx64", %d, %ld,
%"PRId64"\n",
rec->start_addr, rec->trans_count,
rec->insns, rec->exec_count);
}
diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c
index ecd6c18732..eacc678eac 100644
--- a/contrib/plugins/hotpages.c
+++ b/contrib/plugins/hotpages.c
@@ -88,7 +88,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)
for (i = 0; i < limit && it->next; i++, it = it->next) {
PageCounters *rec = (PageCounters *) it->data;
g_string_append_printf(report,
- "%#016"PRIx64", 0x%04x, %"PRId64
+ "0x%016"PRIx64", 0x%04x, %"PRId64
", 0x%04x, %"PRId64"\n",
rec->page_address,
rec->cpu_read, rec->reads,
diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c
index 3b9a6939f2..6e602aaccf 100644
--- a/contrib/plugins/howvec.c
+++ b/contrib/plugins/howvec.c
@@ -209,7 +209,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)
i++, counts = g_list_next(counts)) {
InsnExecCount *rec = (InsnExecCount *) counts->data;
g_string_append_printf(report,
- "Instr: %-24s\t(%ld hits)\t(op=%#08x/%s)\n",
+ "Instr: %-24s\t(%ld
hits)\t(op=0x%08x/%s)\n",
rec->insn,
rec->count,
rec->opcode,
diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c
index 5aad50869d..7fd35eb669 100644
--- a/contrib/plugins/lockstep.c
+++ b/contrib/plugins/lockstep.c
@@ -134,7 +134,7 @@ static void report_divergance(ExecState *us, ExecState
*them)
/* Output short log entry of going out of sync... */
if (verbose || divrec.distance == 1 || diverged) {
- g_string_printf(out, "@ %#016lx vs %#016lx (%d/%d since last)\n",
+ g_string_printf(out, "@ 0x%016lx vs 0x%016lx (%d/%d since last)\n",
us->pc, them->pc, g_slist_length(divergence_log),
divrec.distance);
qemu_plugin_outs(out->str);
@@ -144,7 +144,7 @@ static void report_divergance(ExecState *us, ExecState
*them)
int i;
GSList *entry;
- g_string_printf(out, "Δ insn_count @ %#016lx (%ld) vs %#016lx (%ld)\n",
+ g_string_printf(out, "Δ insn_count @ 0x%016lx (%ld) vs 0x%016lx
(%ld)\n",
us->pc, us->insn_count, them->pc, them->insn_count);
for (entry = log, i = 0;
@@ -152,7 +152,7 @@ static void report_divergance(ExecState *us, ExecState
*them)
entry = g_slist_next(entry), i++) {
ExecInfo *prev = (ExecInfo *) entry->data;
g_string_append_printf(out,
- " previously @ %#016lx/%ld (%ld insns)\n",
+ " previously @ 0x%016lx/%ld (%ld insns)\n",
prev->block->pc, prev->block->insns,
prev->insn_count);
}
--
2.20.1
- [PULL 00/23] plugin updates (hwprofile, CF_NOCACHE, io_recompile), Alex Bennée, 2021/02/18
- [PULL 01/23] hw/virtio/pci: include vdev name in registered PCI sections, Alex Bennée, 2021/02/18
- [PULL 12/23] target/mips: Create mips_io_recompile_replay_branch, Alex Bennée, 2021/02/18
- [PULL 04/23] contrib: Don't use '#' flag of printf format,
Alex Bennée <=
- [PULL 02/23] plugins: add API to return a name for a IO device, Alex Bennée, 2021/02/18
- [PULL 10/23] exec: Move TranslationBlock typedef to qemu/typedefs.h, Alex Bennée, 2021/02/18
- [PULL 03/23] plugins: new hwprofile plugin, Alex Bennée, 2021/02/18
- [PULL 05/23] contrib: Fix some code style problems, ERROR: "foo * bar" should be "foo *bar", Alex Bennée, 2021/02/18
- [PULL 07/23] contrib: space required after that ',', Alex Bennée, 2021/02/18
- [PULL 08/23] contrib: Open brace '{' following struct go on the same line, Alex Bennée, 2021/02/18
- [PULL 06/23] contrib: Add spaces around operator, Alex Bennée, 2021/02/18
- [PULL 11/23] accel/tcg: Create io_recompile_replay_branch hook, Alex Bennée, 2021/02/18
- [PULL 15/23] tests/acceptance: add a new set of tests to exercise plugins, Alex Bennée, 2021/02/18
- [PULL 18/23] accel/tcg: re-factor non-RAM execution code, Alex Bennée, 2021/02/18