Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: mmp: print IRQ resource using %pR format string

resource_size_t cannot be printed using the %x format string
when we it is defined as u64:

drivers/video/fbdev/mmp/hw/mmp_ctrl.c: In function 'mmphw_probe':
drivers/video/fbdev/mmp/hw/mmp_ctrl.c:506:22: 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_err(ctrl->dev, "%s: res %x - %x map failed\n", __func__,
^
drivers/video/fbdev/mmp/hw/mmp_ctrl.c:506:22: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=]

This changes the format string to %pR, which is interpreted
by the printk implementation to pretty-print a resource
structure.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Arnd Bergmann and committed by
Tomi Valkeinen
c3a2da26 ef88ee4e

+1 -2
+1 -2
drivers/video/fbdev/mmp/hw/mmp_ctrl.c
··· 503 503 ctrl->reg_base = devm_ioremap_nocache(ctrl->dev, 504 504 res->start, resource_size(res)); 505 505 if (ctrl->reg_base == NULL) { 506 - dev_err(ctrl->dev, "%s: res %x - %x map failed\n", __func__, 507 - res->start, res->end); 506 + dev_err(ctrl->dev, "%s: res %pR map failed\n", __func__, res); 508 507 ret = -ENOMEM; 509 508 goto failed; 510 509 }