From patchwork Tue Apr 29 16:54:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 4088471 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E72C3BFF02 for ; Tue, 29 Apr 2014 16:54:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F1BEB20218 for ; Tue, 29 Apr 2014 16:54:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AB1B9201FB for ; Tue, 29 Apr 2014 16:54:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757679AbaD2QyZ (ORCPT ); Tue, 29 Apr 2014 12:54:25 -0400 Received: from mail-ig0-f179.google.com ([209.85.213.179]:56231 "EHLO mail-ig0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756824AbaD2QyZ (ORCPT ); Tue, 29 Apr 2014 12:54:25 -0400 Received: by mail-ig0-f179.google.com with SMTP id hl10so556878igb.0 for ; Tue, 29 Apr 2014 09:54:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=KOIvi+OoNHoHk7yr2vh5Z77xgVumpfPPkUSk64sXvi8=; b=hbmXykXRoPkUZdraixE6RAXLHVDnKRqpnkD2ocwpD43+5fVlzRZEmbfdL7s+Jyh133 MHfaLe8RwtW2SE+2Lcd8kXG0hKd/PYvjluQqShw+p7EG/u3hdE4U9teCeTL5hMtEfYFl EWBdU8lnWM+kSP2pHxWw2n+2WXdR0NGEuuU93E/FVchVWQt0inqV5G+wIjBP7lfy2eYu CpofFSNo3qwvQZeUMzWSa0WcuwKnSA9lnzlm6EZVAmrtj9PzSqzDNXDYSTO2ip8PTqyb WS7V4WlVAaXTu8EXGQFCCFxug2CCohVCHsmNOPSbiqeu7XsJq50LExEiMQ0ABJyGVAZJ PewA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=KOIvi+OoNHoHk7yr2vh5Z77xgVumpfPPkUSk64sXvi8=; b=jWNlPheREbWLOEh+OLwYIJzgZy69PpsHiGishRZRQbdrYwJmOMFmSsNwRcJPCt3QPR kt+QHNumnWdGPzG2eB/OQ73aws1obYKEIE32zzQpmGwThgOOzoXaeyEcE+z/hHIh3iuH xoqqyyBzQu4cisSWi6OjUNyY1ZAH1HEDbwfHjth0v+Xd5x9MjgymjUmUqOhl1Ko4c6fx 7N+De/hqCYv7lhgaWjSOggTUIzJg/LN8PqncI/jVexcgp269ntHC6fCjRCzOpMq/MqCS KEFxDDtENGudqWmHdDNGd/TVtOD/ivtBd+Z/9be6Hs43j14GRVZhn2xr0IrQT4iGIK8R DoKA== X-Gm-Message-State: ALoCoQkFgnvRvHORRpZJZppJEta4Z+z3dh85B72LhML2CTXNRYqXu4XAeQMeRpn1uqpEVrLqk8GZvmLXBl94Y0cevdXio1cuT4+KfI/oAmJsiA/lF/wSjt6+WDjEbCUSidQ0AR9rUr4t5sXN2IBBFQqYD1HVnvXUiWnPmelQV32SKJ9pAg7A++ztLS4/U8iPJF+W756ftMr1pZ92ZSDUZC0Pf1iTTDIX7A== X-Received: by 10.42.99.8 with SMTP id u8mr30863656icn.31.1398790462854; Tue, 29 Apr 2014 09:54:22 -0700 (PDT) Received: from google.com ([172.16.48.12]) by mx.google.com with ESMTPSA id b8sm9172151igx.3.2014.04.29.09.54.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 29 Apr 2014 09:54:22 -0700 (PDT) Date: Tue, 29 Apr 2014 10:54:19 -0600 From: Bjorn Helgaas To: Fabio Estevam Cc: thomas.petazzoni@free-electrons.com, linux-pci@vger.kernel.org, jg1.han@samsung.com, Jason Cooper Subject: Re: [PATCH v3] pci: pci-mvebu: Use '%pa' for printing 'phys_addr_t' type Message-ID: <20140429165419.GA13735@google.com> References: <1398776287-14229-1-git-send-email-fabio.estevam@freescale.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1398776287-14229-1-git-send-email-fabio.estevam@freescale.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 [+cc Jason] On Tue, Apr 29, 2014 at 09:58:07AM -0300, Fabio Estevam wrote: > Fix the following build warning that happens when building multi_v7_defconfig > with CONFIG_ARM_LPAE=y: > > drivers/pci/host/pci-mvebu.c:334:5: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'phys_addr_t' [-Wformat=] > > Fix the warning by using '%pa' to printing 'phys_addr_t' type. While at it, > also use the more standard notation [mem 0x - 0x] for memory region. > > Signed-off-by: Fabio Estevam > --- > Changes since v2: > - Introduce variable 'end' for printing the memory range > > Changes since v1: > - use the [mem 0x - 0x] notation > > drivers/pci/host/pci-mvebu.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c > index e384e25..8329592 100644 > --- a/drivers/pci/host/pci-mvebu.c > +++ b/drivers/pci/host/pci-mvebu.c > @@ -329,9 +329,11 @@ static void mvebu_pcie_add_windows(struct mvebu_pcie_port *port, > ret = mvebu_mbus_add_window_remap_by_id(target, attribute, base, > sz, remap); > if (ret) { > + phys_addr_t end = base + sz; This needs to be "base + sz - 1" because we print inclusive ranges. > + > dev_err(&port->pcie->pdev->dev, > - "Could not create MBus window at 0x%x, size 0x%x: %d\n", > - base, sz, ret); > + "Could not create MBus window at [mem %pa - %pa] :%d\n", I removed the extra spaces (relative to %pR) here. > + &base, &end, ret); > mvebu_pcie_del_windows(port, base - size_mapped, > size_mapped); > return; I'm ready to merge the following, given an ack from Thomas or Jason. Jingoo, I added your reviewed-by, since this is essentially what you reviewed before. Bjorn commit 5bbf2f268b9001c2e46aff6ff17cee0e8a6b8fb8 Author: Fabio Estevam Date: Tue Apr 29 09:58:07 2014 -0300 PCI: mvebu: Use '%pa' for printing 'phys_addr_t' type Fix the following build warning that happens when building multi_v7_defconfig with CONFIG_ARM_LPAE=y: drivers/pci/host/pci-mvebu.c:334:5: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'phys_addr_t' [-Wformat=] Fix the warning by using '%pa' to printing 'phys_addr_t' type. While at it, also use the more standard notation [mem 0x-0x] for memory region. Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Helgaas Reviewed-by: Jingoo Han Acked-by: Jason Cooper --- 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/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index 29d64c9efa85..7f450322f397 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -328,9 +328,11 @@ static void mvebu_pcie_add_windows(struct mvebu_pcie_port *port, ret = mvebu_mbus_add_window_remap_by_id(target, attribute, base, sz, remap); if (ret) { + phys_addr_t end = base + sz - 1; + dev_err(&port->pcie->pdev->dev, - "Could not create MBus window at 0x%x, size 0x%x: %d\n", - base, sz, ret); + "Could not create MBus window at [mem %pa-%pa]: %d\n", + &base, &end, ret); mvebu_pcie_del_windows(port, base - size_mapped, size_mapped); return;