Re: [PATCH AUTOSEL 5.3 20/49] firmware: bcm47xx_nvram: Correct size_t printf format

From: Sasha Levin
Date: Sat Oct 05 2019 - 18:53:13 EST


On Sun, Sep 29, 2019 at 12:39:05PM -0700, Florian Fainelli wrote:


On 9/29/2019 10:30 AM, Sasha Levin wrote:
From: Florian Fainelli <f.fainelli@xxxxxxxxx>

[ Upstream commit feb4eb060c3aecc3c5076bebe699cd09f1133c41 ]

When building on a 64-bit host, we will get warnings like those:

drivers/firmware/broadcom/bcm47xx_nvram.c:103:3: note: in expansion of macro 'pr_err'
pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n",
^~~~~~
drivers/firmware/broadcom/bcm47xx_nvram.c:103:28: note: format string is defined here
pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n",
~^
%li

Use %zu instead for that purpose.

This is not a fix that should be backported as it was done only to allow
the driver to the made buildable with COMPILE_TEST. Please drop it from
your auto-selection.

Now dropped, thank you!

--
Thanks,
Sasha