From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 1/4] hw/pci/msi: Fix debug format string
Date: Tue, 14 Mar 2023 12:14:32 +0100 [thread overview]
Message-ID: <20230314111435.89796-2-philmd@linaro.org> (raw)
In-Reply-To: <20230314111435.89796-1-philmd@linaro.org>
Fix this format string warning when defining MSI_DEBUG:
hw/pci/msi.c:209:28: warning: format specifies type 'char' but the argument has type 'unsigned int' [-Wformat]
offset, nr_vectors, msi64bit, msi_per_vector_mask);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/pci/msi.c:83:61: note: expanded from macro 'MSI_DEV_PRINTF'
MSI_DPRINTF("%s:%x " fmt, (dev)->name, (dev)->devfn, ## __VA_ARGS__)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
hw/pci/msi.c:78:58: note: expanded from macro 'MSI_DPRINTF'
fprintf(stderr, "%s:%d " fmt, __func__, __LINE__, ## __VA_ARGS__)
~~~ ^~~~~~~~~~~
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/pci/msi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci/msi.c b/hw/pci/msi.c
index 041b0bdbec..5de6df8154 100644
--- a/hw/pci/msi.c
+++ b/hw/pci/msi.c
@@ -204,7 +204,7 @@ int msi_init(struct PCIDevice *dev, uint8_t offset,
}
MSI_DEV_PRINTF(dev,
- "init offset: 0x%"PRIx8" vector: %"PRId8
+ "init offset: 0x%"PRIx8" vector: %u"
" 64bit %d mask %d\n",
offset, nr_vectors, msi64bit, msi_per_vector_mask);
--
2.38.1
next prev parent reply other threads:[~2023-03-14 11:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 11:14 [PATCH 0/4] hw/pci: Ensure capabilities are added before calling pci_qdev_realize() Philippe Mathieu-Daudé
2023-03-14 11:14 ` Philippe Mathieu-Daudé [this message]
2023-03-14 11:14 ` [PATCH 2/4] hw/pci/msi: Ensure msi_init() is called before device is realized Philippe Mathieu-Daudé
2023-03-14 11:14 ` [PATCH 3/4] hw/pci: Add sanity check in pci_find_space() Philippe Mathieu-Daudé
2023-03-14 11:14 ` [PATCH 4/4] hw/pci: Ensure pci_add_capability() is called before device is realized Philippe Mathieu-Daudé
2023-03-22 2:18 ` Michael S. Tsirkin
2023-03-22 8:52 ` Philippe Mathieu-Daudé
2023-03-22 22:01 ` Philippe Mathieu-Daudé
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=20230314111435.89796-2-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=jasowang@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.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 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).