From: Peter Xu Subject: Re: [PATCH kvm-unit-tests 1/2] pci: fix 32-bit compilation Date: Thu, 12 Jan 2017 11:49:48 +0800 Message-ID: <20170112034948.GJ4450@pxdev.xzpeter.org> References: <20170111142445.5186-1-drjones@redhat.com> <20170111142445.5186-2-drjones@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: kvm@vger.kernel.org, pbonzini@redhat.com To: Andrew Jones Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35320 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752066AbdALDty (ORCPT ); Wed, 11 Jan 2017 22:49:54 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 3C62B43CA1 for ; Thu, 12 Jan 2017 03:49:55 +0000 (UTC) Content-Disposition: inline In-Reply-To: <20170111142445.5186-2-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jan 11, 2017 at 03:24:44PM +0100, Andrew Jones wrote: > Cc: Peter Xu > Signed-off-by: Andrew Jones Reviewed-by: Peter Xu > --- > 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 > -- peterx