Re: [PATCH] cpufreq: sun50i: Fix build warning around snprint()
From: Chen-Yu Tsai
Date: Mon Apr 22 2024 - 02:28:16 EST
On Sun, Apr 21, 2024 at 8:31 PM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
>
> The Sun50i driver generates a warning with W=1:
>
> warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=]
>
> Fix it by allocating a big enough array to print an integer.
>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202404191715.LDwMm2gP-lkp@xxxxxxxxx/
> Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
Acked-by: Chen-Yu Tsai <wens@xxxxxxxx>