lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOesGMgSnW9e4M63RVWyAtqTbhj4_+Kmw_Rm71aCUUhiav25Vw@mail.gmail.com>
Date:	Tue, 26 Nov 2013 11:17:38 -0800
From:	Olof Johansson <olof@...om.net>
To:	Joe Perches <joe@...ches.com>
Cc:	LinusW <linus.walleij@...aro.org>, linux-gpio@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: pl061: print resource_size_t as %pa

On Tue, Nov 26, 2013 at 11:14 AM, Joe Perches <joe@...ches.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ