Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Kusanagi Kouichi <slash@ac.auone-net.jp>
To: kvm@vger.kernel.org
Subject: [PATCH] Fix build failure with DEVICE_ASSIGNMENT_DEBUG.
Date: Tue, 29 Dec 2009 11:24:36 +0900	[thread overview]
Message-ID: <20091229022437.0F7A36FC039@msa105.auone-net.jp> (raw)

If DEVICE_ASSIGNMENT_DEBUG is defined, build fails.

  CC    x86_64-softmmu/device-assignment.o
hw/device-assignment.c: In function 'assigned_dev_iomem_map_slow':
hw/device-assignment.c:235: error: expected expression before ')' token
cc1: warnings being treated as errors
hw/device-assignment.c: In function 'assigned_dev_iomem_map':
hw/device-assignment.c:264: error: format '%08x' expects type 'unsigned int', but argument 4 has type 'pcibus_t'
hw/device-assignment.c:264: error: format '%08x' expects type 'unsigned int', but argument 7 has type 'pcibus_t'
hw/device-assignment.c: In function 'assigned_dev_ioport_map':
hw/device-assignment.c:313: error: format '%x' expects type 'unsigned int', but argument 4 has type 'pcibus_t'
hw/device-assignment.c:313: error: format '%d' expects type 'int', but argument 7 has type 'pcibus_t'
hw/device-assignment.c: In function 'msix_mmio_writel':
hw/device-assignment.c:1270: error: format '%lx' expects type 'long unsigned int', but argument 5 has type 'uint32_t'
make[1]: *** [device-assignment.o] Error 1
make: *** [subdir-x86_64-softmmu] Error 2

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
---
 hw/device-assignment.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index 110fd37..f4a1e32 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -232,7 +232,7 @@ static void assigned_dev_iomem_map_slow(PCIDevice *pci_dev, int region_num,
     PCIRegion *real_region = &r_dev->real_device.regions[region_num];
     int m;
 
-    DEBUG("slow map\n");
+    DEBUG("%s", "slow map\n");
     if (region_num == PCI_ROM_SLOT)
         m = cpu_register_io_memory(slow_bar_read, NULL, region);
     else
@@ -261,7 +261,7 @@ static void assigned_dev_iomem_map(PCIDevice *pci_dev, int region_num,
     int first_map = (region->e_size == 0);
     int ret = 0;
 
-    DEBUG("e_phys=%08x r_virt=%p type=%d len=%08x region_num=%d \n",
+    DEBUG("e_phys=%08" FMT_PCIBUS " r_virt=%p type=%d len=%08" FMT_PCIBUS " region_num=%d \n",
           e_phys, region->u.r_virtbase, type, e_size, region_num);
 
     region->e_physbase = e_phys;
@@ -310,7 +310,7 @@ static void assigned_dev_ioport_map(PCIDevice *pci_dev, int region_num,
     region->e_physbase = addr;
     region->e_size = size;
 
-    DEBUG("e_phys=0x%x r_baseport=%x type=0x%x len=%d region_num=%d \n",
+    DEBUG("e_phys=0x%" FMT_PCIBUS " r_baseport=%x type=0x%x len=%" FMT_PCIBUS " region_num=%d \n",
           addr, region->u.r_baseport, type, size, region_num);
 
     if (first_map) {
@@ -1267,7 +1267,7 @@ static void msix_mmio_writel(void *opaque,
     unsigned int offset = addr & 0xfff;
     void *page = adev->msix_table_page;
 
-    DEBUG("write to MSI-X entry table mmio offset 0x%lx, val 0x%lx\n",
+    DEBUG("write to MSI-X entry table mmio offset 0x%lx, val 0x%x\n",
 		    addr, val);
     memcpy((void *)((char *)page + offset), &val, 4);
 }
-- 
1.6.5.7


             reply	other threads:[~2009-12-29  2:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-29  2:24 Kusanagi Kouichi [this message]
2009-12-30 14:34 ` [PATCH] Fix build failure with DEVICE_ASSIGNMENT_DEBUG Marcelo Tosatti

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=20091229022437.0F7A36FC039@msa105.auone-net.jp \
    --to=slash@ac.auone-net.jp \
    --cc=kvm@vger.kernel.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