From patchwork Wed Jan 11 16:28:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 9510611 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C6054606E1 for ; Wed, 11 Jan 2017 16:30:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A22E82841B for ; Wed, 11 Jan 2017 16:30:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94B0028478; Wed, 11 Jan 2017 16:30:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1F5AB28498 for ; Wed, 11 Jan 2017 16:30:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cRLmv-0003EB-3w; Wed, 11 Jan 2017 16:30:13 +0000 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cRLlz-00005P-NH for linux-arm-kernel@lists.infradead.org; Wed, 11 Jan 2017 16:29:18 +0000 Received: by mail-wm0-x22c.google.com with SMTP id r126so16749740wmr.0 for ; Wed, 11 Jan 2017 08:28:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ygUGGM0WRBJ788r6EZZryCStRGTY5vQ75eATYqoYm90=; b=PA/weQ+UP3wUtJstOAjKUVPIUZeYeg1Q6tcQDFB//EMT9Jbz6d9aArGq7vT8um6kUt fmsXpsptpS5LGr7QdeGrYHx9LZLxXNe6FmMdsQuRmiQxDDQQEhjwqu+5+vdUkNCQeuyL FLRAeto0aZcDEXIJFz8M8XieSsnTeo6YbIhAc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ygUGGM0WRBJ788r6EZZryCStRGTY5vQ75eATYqoYm90=; b=EIySmtqhrERtmR1Hrd1SzIjDtyw1Kqq+oFrdj5Y0G60BWGpSd6GEOKN4jhZPqq9aKx YywIrHzhgdIyitRIe5HCOQT5QlDXj+/3xUorXiPBuQ7g2XvKy4nMpHOVy9pLU3LCA2bD ywv7oK56yBzG9zeyGXh7SW9XhmHQiC/wuh2G7P5aKOT60ZVdEDAg4FrEeuTnymvwoxwS jxt24GrwyQEapr+OdPBHxNfNHhGzli6SLTqGWV9OTlsJ8QyzikU3M1onMjVTPzwS+ctL rzxbHpnL4SpCFYPBTNIN+nt+AuY+cIM373GZdgwCELoIkCtMjrXxVazdWHPhUXl2OSmT agGw== X-Gm-Message-State: AIkVDXLp/nqjp2gjsOX6wgg0U6C3ZQZnuYx4+/C/OAIril5vnM/tqkQsOlvfqj931+Km6vzZ X-Received: by 10.28.107.77 with SMTP id g74mr3716495wmc.109.1484152133797; Wed, 11 Jan 2017 08:28:53 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id yy7sm9258293wjc.3.2017.01.11.08.28.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 08:28:51 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id BC4063E0672; Wed, 11 Jan 2017 16:28:48 +0000 (GMT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: drjones@redhat.com, pbonzini@redhat.com Subject: [kvm-unit-tests PATCH 2/6] lib/pci: fix BAR format strings Date: Wed, 11 Jan 2017 16:28:37 +0000 Message-Id: <20170111162841.15569-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170111162841.15569-1-alex.bennee@linaro.org> References: <20170111162841.15569-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170111_082915_985504_03BEE1E4 X-CRM114-Status: GOOD ( 10.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, marc.zyngier@arm.com, linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Using %x as a format string is not portable across 32/64 bit builds. Use explicit PRIx32 format strings like the 64 bit version above. Signed-off-by: Alex Bennée --- lib/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pci.c b/lib/pci.c index 6416191..597d8f2 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%" PRIx32 "\n", msi_addr, msi_data); msi_control |= PCI_MSI_FLAGS_ENABLE; pci_config_writew(addr, offset + PCI_MSI_FLAGS, msi_control); @@ -237,7 +237,7 @@ void pci_bar_print(struct pci_dev *dev, int bar_num) printf("BAR#%d,%d [%" PRIx64 "-%" PRIx64 " ", bar_num, bar_num + 1, start, end); } else { - printf("BAR#%d [%02x-%02x ", + printf("BAR#%d [%" PRIx32 "-%" PRIx32 " ", bar_num, (uint32_t)start, (uint32_t)end); }