lkml.org 
[lkml]   [2013]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] gpio: pl061: print resource_size_t as %pa
From
Date
On Tue, 2013-11-26 at 10:56 -0800, Olof Johansson wrote:
> commit 73675c8aa07 ('gpio: pl061: proper error messages') added a printout
> of a resource_size_t using %x, which produces an error for builds with
> 64-bit resources:

What tree is this?

> drivers/gpio/gpio-pl061.c:345:3: warning: format '%x' expects argument of
> type 'unsigned int', but argument 3 has type 'resource_size_t'
>
> Switch to %pa (and pass in a pointer to the resource instead).
>
> Fixes: 73675c8aa07 ('gpio: pl061: proper error messages')
[]
> diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
[]
> @@ -341,8 +341,8 @@ static int pl061_probe(struct amba_device *adev, const struct amba_id *id)
> }
>
> amba_set_drvdata(adev, chip);
> - dev_err(&adev->dev, "PL061 GPIO chip @%08x registered\n",
> - adev->res.start);
> + dev_err(&adev->dev, "PL061 GPIO chip @%pa registered\n",
> + &adev->res.start);

This looks as if this should not use dev_err, but maybe dev_info
and maybe it should use %pR, &adev->res




\
 
 \ /
  Last update: 2013-11-26 20:41    [W:0.035 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site