[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbv1ok6U-xOtH0t5esJ_SD0Sn_JDpxmZg6XViargOM99g@mail.gmail.com>
Date: Wed, 11 Oct 2017 21:04:38 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
linux-pci <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PCI: v3-semi: print resources using %pR format string
On Wed, Oct 11, 2017 at 4:02 PM, Arnd Bergmann <arnd@...db.de> wrote:
> A resource_size_t can be 32 or 64 bit on arm32, causing a number
> of warnings for incorrect format strings:
>
> In file included from include/linux/printk.h:327:0,
> from include/linux/kernel.h:13,
> from include/linux/interrupt.h:5,
> from drivers/pci/host/pci-v3-semi.c:19:
> drivers/pci/host/pci-v3-semi.c: In function 'v3_pci_setup_resource':
> drivers/pci/host/pci-v3-semi.c:536:4: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'phys_addr_t {aka long long unsigned int}' [-Werror=format=]
> "I/O window start %08x, bus addr %08x, size %08x\n",
> drivers/pci/host/pci-v3-semi.c:536:4: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=]
>
> The best way to print this instead is to pass the resource itself
> to printk as a pointerm, using the special '%pR' format string
> for pretty-printing the range.
>
> For the bus address, we use %pap, respectively.
>
> Fixes: 132d10e24ff3 ("PCI: v3-semi: Add V3 Semiconductor PCI host driver")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Ah this again.
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Sorry about it, is it that checkpatch doesn't warn for this?
Yours,
Linus Walleij
Powered by blists - more mailing lists