* [PATCH] gpio: pl061: print resource_size_t as %pa
@ 2013-11-26 18:56 Olof Johansson
2013-11-26 19:14 ` Joe Perches
0 siblings, 1 reply; 4+ messages in thread
From: Olof Johansson @ 2013-11-26 18:56 UTC (permalink / raw)
To: linus.walleij; +Cc: linux-gpio, linux-kernel, Olof Johansson
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:
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')
Signed-off-by: Olof Johansson <olof@lixom.net>
---
drivers/gpio/gpio-pl061.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index f08e5e2cbe50..4ed16d7bd13d 100644
--- 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);
return 0;
}
--
1.8.4.1.601.g02b3b1d
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: pl061: print resource_size_t as %pa
2013-11-26 18:56 [PATCH] gpio: pl061: print resource_size_t as %pa Olof Johansson
@ 2013-11-26 19:14 ` Joe Perches
2013-11-26 19:17 ` Olof Johansson
0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2013-11-26 19:14 UTC (permalink / raw)
To: Olof Johansson; +Cc: linus.walleij, linux-gpio, linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: pl061: print resource_size_t as %pa
2013-11-26 19:14 ` Joe Perches
@ 2013-11-26 19:17 ` Olof Johansson
2013-11-26 23:49 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Olof Johansson @ 2013-11-26 19:17 UTC (permalink / raw)
To: Joe Perches; +Cc: LinusW, linux-gpio, linux-kernel
On Tue, Nov 26, 2013 at 11:14 AM, Joe Perches <joe@perches.com> wrote:
> 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?
linux-next
>> 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
Yep, I have as a somewhat long-standing todo to scrub for needlessly
elevated printk levels (err and warn) on various drivers during boot,
thanks for shortcutting that. :)
I'll let Linus decide on pR vs pa.
-Olof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: pl061: print resource_size_t as %pa
2013-11-26 19:17 ` Olof Johansson
@ 2013-11-26 23:49 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2013-11-26 23:49 UTC (permalink / raw)
To: Olof Johansson; +Cc: Joe Perches, linux-gpio, linux-kernel
On Tue, Nov 26, 2013 at 8:17 PM, Olof Johansson <olof@lixom.net> wrote:
> On Tue, Nov 26, 2013 at 11:14 AM, Joe Perches <joe@perches.com> wrote:
>> On Tue, 2013-11-26 at 10:56 -0800, Olof Johansson wrote:
>>> 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
>
> Yep, I have as a somewhat long-standing todo to scrub for needlessly
> elevated printk levels (err and warn) on various drivers during boot,
> thanks for shortcutting that. :)
Bah copy/paste bug from my side ...
> I'll let Linus decide on pR vs pa.
I go with the thing you tested, fixed up the commit and also
switched to dev_info().
But now I have worse PL061 problems than this.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-26 23:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-26 18:56 [PATCH] gpio: pl061: print resource_size_t as %pa Olof Johansson
2013-11-26 19:14 ` Joe Perches
2013-11-26 19:17 ` Olof Johansson
2013-11-26 23:49 ` Linus Walleij
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).