]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: onenand: omap2: print resource using %pR format string
authorArnd Bergmann <arnd@arndb.de>
Tue, 16 Jan 2018 07:43:40 +0000 (08:43 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 16 Jan 2018 08:25:12 +0000 (09:25 +0100)
commit35bda8c2afbbe4ef55b82653f5c1c27a1e949189
treef06eaff35ae2462856b111561d280bcaae0e8419
parent67092ca67884f598d2eb93b9d060131543bcfc35
mtd: onenand: omap2: print resource using %pR format string

The omap2 onenand driver is now available for compile-testing, which
uncovers a warning in configurations that have a 64-bit resource_size_t:

drivers/mtd/onenand/omap2.c: In function 'omap2_onenand_probe':
drivers/mtd/onenand/omap2.c:536:54: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=]
   dev_err(dev, "Cannot reserve memory region at 0x%08x, size: 0x%x\n",
drivers/mtd/onenand/omap2.c:536:66: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=]

Changing the format string to the special %pR simplifies the code
and lets it do the right thing in that configuration, while avoiding
the warning.

Fixes: 062f82c51112 ("mtd: onenand: omap2: Configure driver from DT")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/onenand/omap2.c