From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Igor Mammedov <imammedo@redhat.com>,
Kai Deng <dengkai1@huawei.com>,
Xiao Guangrong <xiaoguangrong.eric@gmail.com>,
Xinhao Zhang <zhangxinhao1@huawei.com>
Subject: [PULL v3 08/31] hw/acpi : Don't use '#' flag of printf format
Date: Wed, 4 Nov 2020 13:41:39 -0500 [thread overview]
Message-ID: <20201104184040.285057-9-mst@redhat.com> (raw)
In-Reply-To: <20201104184040.285057-1-mst@redhat.com>
From: Xinhao Zhang <zhangxinhao1@huawei.com>
Fix code style. Don't use '#' flag of printf format ('%#') in
format strings, use '0x' prefix instead
Signed-off-by: Xinhao Zhang <zhangxinhao1@huawei.com>
Signed-off-by: Kai Deng <dengkai1@huawei.com>
Message-Id: <20201103102634.273021-1-zhangxinhao1@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/acpi/nvdimm.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 8f7cc16add..8ad5516142 100644
--- a/hw/acpi/nvdimm.c
+++ b/hw/acpi/nvdimm.c
@@ -556,7 +556,7 @@ static void nvdimm_dsm_func_read_fit(NVDIMMState *state, NvdimmDsmIn *in,
fit = fit_buf->fit;
- nvdimm_debug("Read FIT: offset %#x FIT size %#x Dirty %s.\n",
+ nvdimm_debug("Read FIT: offset 0x%x FIT size 0x%x Dirty %s.\n",
read_fit->offset, fit->len, fit_buf->dirty ? "Yes" : "No");
if (read_fit->offset > fit->len) {
@@ -664,7 +664,7 @@ static void nvdimm_dsm_label_size(NVDIMMDevice *nvdimm, hwaddr dsm_mem_addr)
label_size = nvdimm->label_size;
mxfer = nvdimm_get_max_xfer_label_size();
- nvdimm_debug("label_size %#x, max_xfer %#x.\n", label_size, mxfer);
+ nvdimm_debug("label_size 0x%x, max_xfer 0x%x.\n", label_size, mxfer);
label_size_out.func_ret_status = cpu_to_le32(NVDIMM_DSM_RET_STATUS_SUCCESS);
label_size_out.label_size = cpu_to_le32(label_size);
@@ -680,19 +680,19 @@ static uint32_t nvdimm_rw_label_data_check(NVDIMMDevice *nvdimm,
uint32_t ret = NVDIMM_DSM_RET_STATUS_INVALID;
if (offset + length < offset) {
- nvdimm_debug("offset %#x + length %#x is overflow.\n", offset,
+ nvdimm_debug("offset 0x%x + length 0x%x is overflow.\n", offset,
length);
return ret;
}
if (nvdimm->label_size < offset + length) {
- nvdimm_debug("position %#x is beyond label data (len = %" PRIx64 ").\n",
+ nvdimm_debug("position 0x%x is beyond label data (len = %" PRIx64 ").\n",
offset + length, nvdimm->label_size);
return ret;
}
if (length > nvdimm_get_max_xfer_label_size()) {
- nvdimm_debug("length (%#x) is larger than max_xfer (%#x).\n",
+ nvdimm_debug("length (0x%x) is larger than max_xfer (0x%x).\n",
length, nvdimm_get_max_xfer_label_size());
return ret;
}
@@ -716,7 +716,7 @@ static void nvdimm_dsm_get_label_data(NVDIMMDevice *nvdimm, NvdimmDsmIn *in,
get_label_data->offset = le32_to_cpu(get_label_data->offset);
get_label_data->length = le32_to_cpu(get_label_data->length);
- nvdimm_debug("Read Label Data: offset %#x length %#x.\n",
+ nvdimm_debug("Read Label Data: offset 0x%x length 0x%x.\n",
get_label_data->offset, get_label_data->length);
status = nvdimm_rw_label_data_check(nvdimm, get_label_data->offset,
@@ -755,7 +755,7 @@ static void nvdimm_dsm_set_label_data(NVDIMMDevice *nvdimm, NvdimmDsmIn *in,
set_label_data->offset = le32_to_cpu(set_label_data->offset);
set_label_data->length = le32_to_cpu(set_label_data->length);
- nvdimm_debug("Write Label Data: offset %#x length %#x.\n",
+ nvdimm_debug("Write Label Data: offset 0x%x length 0x%x.\n",
set_label_data->offset, set_label_data->length);
status = nvdimm_rw_label_data_check(nvdimm, set_label_data->offset,
@@ -838,7 +838,7 @@ nvdimm_dsm_write(void *opaque, hwaddr addr, uint64_t val, unsigned size)
NvdimmDsmIn *in;
hwaddr dsm_mem_addr = val;
- nvdimm_debug("dsm memory address %#" HWADDR_PRIx ".\n", dsm_mem_addr);
+ nvdimm_debug("dsm memory address 0x%" HWADDR_PRIx ".\n", dsm_mem_addr);
/*
* The DSM memory is mapped to guest address space so an evil guest
@@ -852,11 +852,11 @@ nvdimm_dsm_write(void *opaque, hwaddr addr, uint64_t val, unsigned size)
in->function = le32_to_cpu(in->function);
in->handle = le32_to_cpu(in->handle);
- nvdimm_debug("Revision %#x Handler %#x Function %#x.\n", in->revision,
+ nvdimm_debug("Revision 0x%x Handler 0x%x Function 0x%x.\n", in->revision,
in->handle, in->function);
if (in->revision != 0x1 /* Currently we only support DSM Spec Rev1. */) {
- nvdimm_debug("Revision %#x is not supported, expect %#x.\n",
+ nvdimm_debug("Revision 0x%x is not supported, expect 0x%x.\n",
in->revision, 0x1);
nvdimm_dsm_no_payload(NVDIMM_DSM_RET_STATUS_UNSUPPORT, dsm_mem_addr);
goto exit;
--
MST
next prev parent reply other threads:[~2020-11-04 18:44 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 18:41 [PULL v3 00/31] pc,pci,vhost,virtio: fixes Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 01/31] pc: comment style fixup Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 02/31] virtio-mem: Make sure "addr" is always multiples of the block size Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 03/31] virtio-mem: Make sure "usable_region_size" " Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 04/31] virtio-mem: Probe THP size to determine default " Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 05/31] memory-device: Support big alignment requirements Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 06/31] memory-device: Add get_min_alignment() callback Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 07/31] virito-mem: Implement get_min_alignment() Michael S. Tsirkin
2020-11-04 18:41 ` Michael S. Tsirkin [this message]
2020-11-04 18:41 ` [PULL v3 09/31] hw/acpi : add space before the open parenthesis '(' Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 10/31] hw/acpi : add spaces around operator Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 11/31] hw/virtio/vhost-backend: Fix Coverity CID 1432871 Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 12/31] hw/smbios: Fix leaked fd in save_opt_one() error path Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 13/31] virtio-iommu: Fix virtio_iommu_mr() Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 14/31] virtio-iommu: Store memory region in endpoint struct Michael S. Tsirkin
2020-11-04 18:41 ` [PULL v3 15/31] virtio-iommu: Add memory notifiers for map/unmap Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 16/31] virtio-iommu: Call memory notifiers in attach/detach Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 17/31] virtio-iommu: Add replay() memory region callback Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 18/31] virtio-iommu: Add notify_flag_changed() " Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 19/31] memory: Add interface to set iommu page size mask Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 20/31] vfio: Set IOMMU page size as per host supported page size Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 21/31] virtio-iommu: Set supported page size mask Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 22/31] vfio: Don't issue full 2^64 unmap Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 23/31] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 24/31] net: Add vhost-vdpa in show_netdevs() Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 25/31] Revert "vhost-blk: set features before setting inflight feature" Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 26/31] vhost-blk: set features before setting inflight feature Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 27/31] libvhost-user: follow QEMU comment style Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 28/31] configure: introduce --enable-vhost-user-blk-server Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 29/31] block/export: make vhost-user-blk config space little-endian Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 30/31] block/export: fix vhost-user-blk get_config() information leak Michael S. Tsirkin
2020-11-04 18:42 ` [PULL v3 31/31] contrib/vhost-user-blk: fix " Michael S. Tsirkin
2020-11-05 16:14 ` [PULL v3 00/31] pc,pci,vhost,virtio: fixes Peter Maydell
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=20201104184040.285057-9-mst@redhat.com \
--to=mst@redhat.com \
--cc=dengkai1@huawei.com \
--cc=imammedo@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=xiaoguangrong.eric@gmail.com \
--cc=zhangxinhao1@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).