Commit c3a2da26 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Tomi Valkeinen

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent ef88ee4e
......@@ -503,8 +503,7 @@ static int mmphw_probe(struct platform_device *pdev)
ctrl->reg_base = devm_ioremap_nocache(ctrl->dev,
res->start, resource_size(res));
if (ctrl->reg_base == NULL) {
dev_err(ctrl->dev, "%s: res %x - %x map failed\n", __func__,
res->start, res->end);
dev_err(ctrl->dev, "%s: res %pR map failed\n", __func__, res);
ret = -ENOMEM;
goto failed;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment