From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
maxime.coquelin@redhat.com, stable@dpdk.org,
Chenbo Xia <chenbo.xia@intel.com>,
David Marchand <david.marchand@redhat.com>
Subject: [PATCH 1/3] vhost: fix build for powerpc
Date: Thu, 31 Aug 2023 13:10:56 +0100 [thread overview]
Message-ID: <20230831121058.725577-2-bruce.richardson@intel.com> (raw)
In-Reply-To: <20230831121058.725577-1-bruce.richardson@intel.com>
When building on Ubuntu using the packaged powerpc compiler[1], a
warning is issued about the print format of the __u64 values.
../../lib/vhost/vduse.c: In function ‘vduse_vring_setup’:
../../lib/vhost/vhost.h:676:17: error: format ‘%llx’ expects argument of
type ‘long long unsigned int’, but argument 5 has type ‘__u64’ {aka
‘long unsigned int’} [-Werror=format=]
676 | "VHOST_CONFIG: (%s) " fmt, prefix, ##args)
| ^~~~~~~~~~~~~~~~~~~~~
Changing the format specifier to %lx, or to use PRIx64 breaks other
builds, so the safest solution is to explicitly typecast the printed
values to match the format string.
[1] powerpc64le-linux-gnu-gcc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0
Fixes: a9120db8b98b ("vhost: add VDUSE device startup")
Cc: maxime.coquelin@redhat.com
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/vhost/vduse.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
index 73ed424232..e2b6d35d37 100644
--- a/lib/vhost/vduse.c
+++ b/lib/vhost/vduse.c
@@ -162,9 +162,12 @@ vduse_vring_setup(struct virtio_net *dev, unsigned int index)
VHOST_LOG_CONFIG(dev->ifname, INFO, "VQ %u info:\n", index);
VHOST_LOG_CONFIG(dev->ifname, INFO, "\tnum: %u\n", vq_info.num);
- VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdesc_addr: %llx\n", vq_info.desc_addr);
- VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdriver_addr: %llx\n", vq_info.driver_addr);
- VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdevice_addr: %llx\n", vq_info.device_addr);
+ VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdesc_addr: %llx\n",
+ (unsigned long long)vq_info.desc_addr);
+ VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdriver_addr: %llx\n",
+ (unsigned long long)vq_info.driver_addr);
+ VHOST_LOG_CONFIG(dev->ifname, INFO, "\tdevice_addr: %llx\n",
+ (unsigned long long)vq_info.device_addr);
VHOST_LOG_CONFIG(dev->ifname, INFO, "\tavail_idx: %u\n", vq_info.split.avail_index);
VHOST_LOG_CONFIG(dev->ifname, INFO, "\tready: %u\n", vq_info.ready);
--
2.39.2
next prev parent reply other threads:[~2023-08-31 12:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 12:10 [PATCH 0/3] enable PPC in test-meson-builds on ubuntu Bruce Richardson
2023-08-31 12:10 ` Bruce Richardson [this message]
2023-09-01 14:59 ` [PATCH 1/3] vhost: fix build for powerpc Bruce Richardson
2023-09-12 18:30 ` David Christensen
2023-09-29 14:47 ` Maxime Coquelin
2023-08-31 12:10 ` [PATCH 2/3] crypto/ipsec_mb: fix build failures due to incompatible lib Bruce Richardson
2023-08-31 13:18 ` Power, Ciara
2023-08-31 12:10 ` [PATCH 3/3] devtools: enable testing ppc builds on ubuntu Bruce Richardson
2023-09-01 1:16 ` Tyler Retzlaff
2023-10-11 9:14 ` [PATCH 0/3] enable PPC in test-meson-builds " Thomas Monjalon
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=20230831121058.725577-2-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=chenbo.xia@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.