]> git.baikalelectronics.ru Git - kernel.git/commit
soc: ixp4xx: fix printing resources
authorArnd Bergmann <arnd@arndb.de>
Fri, 8 Nov 2019 08:43:06 +0000 (09:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Aug 2021 11:21:04 +0000 (13:21 +0200)
commit7a88f60fe81e921383ef2555a8dbc4f0616902a1
treeef80e518dbdd7510f415bba68b1e371faae7d5c7
parent19fc6315980a235efcbc5d4283648b7badfd7186
soc: ixp4xx: fix printing resources

commit 8861452b2097bb0b5d0081a1c137fb3870b0a31f upstream.

When compile-testing with 64-bit resource_size_t, gcc reports an invalid
printk format string:

In file included from include/linux/dma-mapping.h:7,
                 from drivers/soc/ixp4xx/ixp4xx-npe.c:15:
drivers/soc/ixp4xx/ixp4xx-npe.c: In function 'ixp4xx_npe_probe':
drivers/soc/ixp4xx/ixp4xx-npe.c:694:18: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
    dev_info(dev, "NPE%d at 0x%08x-0x%08x not available\n",

Use the special %pR format string to print the resources.

Fixes: 6b4e832b917a ("soc: ixp4xx: npe: Pass addresses as resources")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/soc/ixp4xx/ixp4xx-npe.c