From: Andrew Jones Subject: [PATCH kvm-unit-tests 1/2] pci: fix 32-bit compilation Date: Wed, 11 Jan 2017 15:24:44 +0100 Message-ID: <20170111142445.5186-2-drjones@redhat.com> References: <20170111142445.5186-1-drjones@redhat.com> Cc: pbonzini@redhat.com, Peter Xu To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:52740 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761412AbdAKOYy (ORCPT ); Wed, 11 Jan 2017 09:24:54 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D5A2C64DB3 for ; Wed, 11 Jan 2017 14:24:49 +0000 (UTC) In-Reply-To: <20170111142445.5186-1-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Cc: Peter Xu Signed-off-by: Andrew Jones --- lib/pci-edu.c | 4 ++-- lib/pci.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pci-edu.c b/lib/pci-edu.c index 809647093f72..f94962f0001a 100644 --- a/lib/pci-edu.c +++ b/lib/pci-edu.c @@ -48,9 +48,9 @@ void edu_dma(struct pci_edu_dev *dev, iova_t iova, assert(size <= EDU_DMA_SIZE_MAX); assert(dev_offset < EDU_DMA_SIZE_MAX); - printf("edu device DMA start %s addr %p size 0x%lu off 0x%x\n", + printf("edu device DMA start %s addr 0x%" PRIx64 " size 0x%lu off 0x%x\n", from_device ? "FROM" : "TO", - (void *)iova, size, dev_offset); + iova, (ulong)size, dev_offset); if (from_device) { from = dev_offset + EDU_DMA_START; diff --git a/lib/pci.c b/lib/pci.c index 6416191d3d94..3435266bcf00 100644 --- a/lib/pci.c +++ b/lib/pci.c @@ -67,7 +67,7 @@ bool pci_setup_msi(struct pci_dev *dev, uint64_t msi_addr, uint32_t msi_data) pci_config_writel(addr, offset + PCI_MSI_DATA_32, msi_data); printf("MSI: dev 0x%x init 32bit address: ", addr); } - printf("addr=0x%lx, data=0x%x\n", msi_addr, msi_data); + printf("addr=0x%" PRIx64 ", data=0x%x\n", msi_addr, msi_data); msi_control |= PCI_MSI_FLAGS_ENABLE; pci_config_writew(addr, offset + PCI_MSI_FLAGS, msi_control); -- 2.9.3