linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCI: faraday: use %pap format string for printing resources
Date: Wed, 19 Apr 2017 13:42:11 -0500	[thread overview]
Message-ID: <CAErSpo4BrrOrGTyzsw+s4mn-RVGpoZbGpPc95MJ3aDF64SBY_w@mail.gmail.com> (raw)
In-Reply-To: <20170419175513.88138-1-arnd@arndb.de>

On Wed, Apr 19, 2017 at 12:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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 <arnd@arndb.de>

Thanks, folded into the initial commit.

> ---
>  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;
> --
> 2.9.0
>

      reply	other threads:[~2017-04-19 18:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 17:54 [PATCH] PCI: faraday: use %pap format string for printing resources Arnd Bergmann
2017-04-19 18:42 ` Bjorn Helgaas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAErSpo4BrrOrGTyzsw+s4mn-RVGpoZbGpPc95MJ3aDF64SBY_w@mail.gmail.com \
    --to=bhelgaas@google.com \
    --cc=arnd@arndb.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).