From patchwork Tue Jan 13 14:20:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 5620771 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 41EFE9F3A0 for ; Tue, 13 Jan 2015 14:20:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88BA3205F9 for ; Tue, 13 Jan 2015 14:20:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A59CD2047D for ; Tue, 13 Jan 2015 14:20:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752197AbbAMOUO (ORCPT ); Tue, 13 Jan 2015 09:20:14 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:56992 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751717AbbAMOUN (ORCPT ); Tue, 13 Jan 2015 09:20:13 -0500 Received: from wuerfel.localnet ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0MC7ge-1Y2Cda1UmG-008oPN; Tue, 13 Jan 2015 15:20:06 +0100 From: Arnd Bergmann To: Bjorn Helgaas Cc: linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Srikanth Thokala , Maxime COQUELIN Subject: [PATCH] PCI: xilinx: fix harmless format string warning Date: Tue, 13 Jan 2015 15:20:05 +0100 Message-ID: <1759235.dcJCuiggea@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:DtibPbs3y2cEgCfZf6rF9UnG8RRyxuUsifF+jB3QczV2cgTTfan xMz2ef0w2G/dUUoWADQ0zqtRwaUb0dBf4hrJCiDMBrsT2WuLwpuUBNA9nG+nVWsRd/nluTr 4DyuqYtrVu7cZiI7vxOfvy8ZRnP0n2OtCbPONMmTj4plfjCHv2+7ns42AKRTu99UFu5N/lr FVpT7YkXSTWDn4WK7hiiQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The xilinx pcie driver prints a register value whose type is propagated to the type returned by the GENMASK() macro. Unfortunately, that type has recently changed as the result of a bug fix, so now we get a warning about the type: drivers/pci/host/pcie-xilinx.c: In function 'xilinx_pcie_clear_err_interrupts': drivers/pci/host/pcie-xilinx.c:154:3: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=] This changes the code so we always print the number as an 'unsigned long' type to avoid the warning. The original code was fine on 32-bit architectures but not on 64-bit. Now it works as expected on both. Signed-off-by: Arnd Bergmann Fixes: 00b4d9a1412 ("bitops: Fix shift overflow in GENMASK macros") Acked-by: Maxime Coquelin --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c index ef3ebaf9a738..ce1c61d85b2c 100644 --- a/drivers/pci/host/pcie-xilinx.c +++ b/drivers/pci/host/pcie-xilinx.c @@ -148,10 +148,10 @@ static inline bool xilinx_pcie_link_is_up(struct xilinx_pcie_port *port) */ static void xilinx_pcie_clear_err_interrupts(struct xilinx_pcie_port *port) { - u32 val = pcie_read(port, XILINX_PCIE_REG_RPEFR); + unsigned long val = pcie_read(port, XILINX_PCIE_REG_RPEFR); if (val & XILINX_PCIE_RPEFR_ERR_VALID) { - dev_dbg(port->dev, "Requester ID %d\n", + dev_dbg(port->dev, "Requester ID %lu\n", val & XILINX_PCIE_RPEFR_REQ_ID); pcie_write(port, XILINX_PCIE_RPEFR_ALL_MASK, XILINX_PCIE_REG_RPEFR);