diff options
author | Marek Vasut <marex@denx.de> | 2023-10-27 11:58:24 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-10-27 22:19:18 +0300 |
commit | 7e52b1164a474dc7b90f68fbb40e35ccd7f7e2e2 (patch) | |
tree | b0bd4c75c31c232cdc9e1d03b65135e992b3d9d0 /drivers/clk/clk-si544.c | |
parent | 409c39ec92a35e3708f5b5798c78eae78512cd71 (diff) | |
download | linux-7e52b1164a474dc7b90f68fbb40e35ccd7f7e2e2.tar.xz |
clk: si521xx: Increase stack based print buffer size in probe
Increase the size of temporary print buffer on stack to fix the
following warnings reported by LKP.
Since all the input parameters of snprintf() are under control
of this driver, it is not possible to trigger and overflow here,
but since the print buffer is on stack and discarded once driver
probe() finishes, it is not an issue to increase it by 10 bytes
and fix the warning in the process. Make it so.
"
drivers/clk/clk-si521xx.c: In function 'si521xx_probe':
>> drivers/clk/clk-si521xx.c:318:26: warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=]
snprintf(name, 6, "DIFF%d", i);
^~
drivers/clk/clk-si521xx.c:318:21: note: directive argument in the range [0, 2147483647]
snprintf(name, 6, "DIFF%d", i);
^~~~~~~~
drivers/clk/clk-si521xx.c:318:3: note: 'snprintf' output between 6 and 15 bytes into a destination of size 6
snprintf(name, 6, "DIFF%d", i);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"
Fixes: edc12763a3a2 ("clk: si521xx: Clock driver for Skyworks Si521xx I2C PCIe clock generators")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310260412.AGASjFN4-lkp@intel.com/
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20231027085840.30098-1-marex@denx.de
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/clk-si544.c')
0 files changed, 0 insertions, 0 deletions