From patchwork Wed Apr 19 17:54:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9688579 X-Patchwork-Delegate: bhelgaas@google.com 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 41C766037F for ; Wed, 19 Apr 2017 17:56:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 380B026224 for ; Wed, 19 Apr 2017 17:56:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2906F283E8; Wed, 19 Apr 2017 17:56:00 +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=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAA3D26224 for ; Wed, 19 Apr 2017 17:55:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968357AbdDSRzQ (ORCPT ); Wed, 19 Apr 2017 13:55:16 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:63409 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968792AbdDSRzM (ORCPT ); Wed, 19 Apr 2017 13:55:12 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MLgKR-1d04sB3gUl-000pL0; Wed, 19 Apr 2017 19:55:08 +0200 From: Arnd Bergmann To: Bjorn Helgaas , Linus Walleij Cc: Arnd Bergmann , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] PCI: faraday: use %pap format string for printing resources Date: Wed, 19 Apr 2017 19:54:46 +0200 Message-Id: <20170419175513.88138-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:MxsGBXEP2wH1MjA8Kb/KI+HFhlQ1Zp+q0bMGKgANBo1yZvkamIE nfnEJNemNY1hviWjaKUmCJ9/+A+nQEMTyGN3bqV8tVfY9VbHDN370h6iEWEK0CLsvZFhray BmvSuRy3gpburCWh422Q8lNpXFctRHyyqNSUzocSGbMKlq8w3LLsAjU5Brb5BV/0I3Vqbja dlJ6It0+iIRBp5VoUahAA== X-UI-Out-Filterresults: notjunk:1; V01:K0:CIOkiY9ckdU=:ehhUEU0t9kK5i8BeeKSqXZ cPKqyT5m3dp5DN0JyLNXRcsA/kSmsbxHKCOO2sZcMQ2pOhjdYCrkQ7z2r2SQ8I3ystuBjRhi/ OS/3Iz+ZtLCa1Syzp3AupJciJWwFm0iXaVzbDbBL1sLKHzx5yAL9zCRu0w3o1jWzVBbivokz0 gdyo2iIGXrKC7S4QdYwGVrNiI1iAVvWimychnr+7cf8n3XGcDWZrpORfOe3Jv+rdgFws2PjEK xpIkGJJUWK1Wnwuxhn+xo/hAJSZwShnPiCLVDSPlByJTBrOeyrN/YmDTWeEiueJ6maolqcBAP La8In0lT1rTzZinumU3us7kjYhJ89GuDbc44nK0I4CFDgo2G6vSnZ8MBk7++UhPEqjF8wmzAw DXfYP+1AkR1vfT74JsGvuQpAoiazWZVp/AKabV7OWQPXm6pisoB41b4Rfgl0j2Q16Byjooj8c oVQ1A85qzf1XHLRwpLyk0NwyE5vBWVQKe9//p4uVhs5F4zD07BO7UjHmMI75vazgMfLU2Tfzb IM7NEvXAbmAN+WQPi84MUCriq71znVOQIYpwBUN5PEUxGVmrLkqOZoaLX3JB8XYXxE91be6yR n63GoNDZ0bZk36XhenV7jYoUIqNEBkaX+vkJVyn3r02Jx3D4t/MLnLEnVy7wrnFuIL0uz42In f87yvRPmac++rzHBiRg3SN/oN0nlstNkR7zJDrEOa1ex7fK9cYLsDCscY9/HF0sLWGNk= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP resource_size_t may be either 32-bit or 64-bit wide, so we have to use the special %pap format string to avoid warnings like: drivers/pci/host/pci-ftpci100.c: In function 'faraday_res_to_memcfg': drivers/pci/host/pci-ftpci100.c:174:586: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=] drivers/pci/host/pci-ftpci100.c:174:586: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=] This relies on resource_size_t and phys_addr_t being the same width, as other code already does. Fixes: 5c18f2b240bd ("PCI: faraday: Add Faraday Technology FTPCI100 PCI Host Bridge driver") Signed-off-by: Arnd Bergmann --- drivers/pci/host/pci-ftpci100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-ftpci100.c b/drivers/pci/host/pci-ftpci100.c index 4ae5418a1aad..c0f29d1de341 100644 --- a/drivers/pci/host/pci-ftpci100.c +++ b/drivers/pci/host/pci-ftpci100.c @@ -171,8 +171,8 @@ static int faraday_res_to_memcfg(resource_size_t mem_base, pr_warn("truncated PCI memory base\n"); /* Translate to bridge side address space */ outval |= (mem_base & FARADAY_PCI_MEMBASE_MASK); - pr_debug("Translated pci base @%08x, size %08x to config %08x\n", - mem_base, mem_size, outval); + pr_debug("Translated pci base @%pap, size %pap to config %08x\n", + &mem_base, &mem_size, outval); *val = outval; return 0;