linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbdev: mmp: print IRQ resource using %pR format string
@ 2016-01-25 15:03 Arnd Bergmann
  2016-01-29 11:43 ` Tomi Valkeinen
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2016-01-25 15:03 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/video/fbdev/mmp/hw/mmp_ctrl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c
index de54a4748065..b6f83d5df9fd 100644
--- a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c
+++ b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c
@@ -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;
 	}
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fbdev: mmp: print IRQ resource using %pR format string
  2016-01-25 15:03 [PATCH] fbdev: mmp: print IRQ resource using %pR format string Arnd Bergmann
@ 2016-01-29 11:43 ` Tomi Valkeinen
  0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2016-01-29 11:43 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]



On 25/01/16 17:03, Arnd Bergmann wrote:
> 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.

Thanks, queued for 4.5 fixes.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-29 11:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-25 15:03 [PATCH] fbdev: mmp: print IRQ resource using %pR format string Arnd Bergmann
2016-01-29 11:43 ` Tomi Valkeinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).