build warnings: multi_v7_defconfig + LPAE, printk with variable types
Fabio Estevam
festevam at gmail.com
Wed Aug 21 20:21:09 EDT 2013
On Wed, Aug 21, 2013 at 8:51 PM, Kevin Hilman <khilman at linaro.org> wrote:
> Fabio Estevam <festevam at gmail.com> writes:
>
>> On Wed, Aug 21, 2013 at 12:15 PM, Kevin Hilman <khilman at linaro.org> wrote:
>>> [1]
>>> Warnings:
>>> arch/arm/mach-omap2/gpmc.c:1495:4: warning: format '%x'
>>> expects argument of type 'unsigned int', but argument 4 has type
>>> resource_size_t' [-Wformat]
>>
>> For this warning, what about this?
>>
>> --- a/arch/arm/mach-omap2/gpmc.c
>> +++ b/arch/arm/mach-omap2/gpmc.c
>> @@ -1491,8 +1491,8 @@ static int gpmc_probe_generic_child(struct
>> platform_device *pdev,
>> */
>> ret = gpmc_cs_remap(cs, res.start);
>> if (ret < 0) {
>> - dev_err(&pdev->dev, "cannot remap GPMC CS %d to 0x%x\n",
>> - cs, res.start);
>> + dev_err(&pdev->dev, "cannot remap GPMC CS %d to 0x%pa\n",
>> + cs, &res.start);
>
> hmm, why did you add the '&' ? That changes the behavior, not just the
> format.
Yes, this is required. Please refer to the 'Passed by reference.' in
the end of the paragrah of Documention/printk-formats.txt.
The other good thing of using '%pa' is that I can remove the '0x' as
well. Just noticed this after doing some local tests. Will submit the
patches shortly.
More information about the linux-arm-kernel
mailing list