linux-stable/drivers/opp
Viresh Kumar 20fd74fa88 OPP: debugfs: Fix warning around icc_get_name()
[ Upstream commit 28330ceb95 ]

If the kernel isn't built with interconnect support, icc_get_name()
returns NULL and we get following warning:

drivers/opp/debugfs.c: In function 'bw_name_read':
drivers/opp/debugfs.c:43:42: error: '%.62s' directive argument is null [-Werror=format-overflow=]
         i = scnprintf(buf, sizeof(buf), "%.62s\n", icc_get_name(path));

Fix it.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402141313.81ltVF5g-lkp@intel.com/
Fixes: 0430b1d570 ("opp: Expose bandwidth information via debugfs")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:20:42 -04:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
core.c OPP: Pass rounded rate to _set_opp() 2024-01-31 16:16:58 -08:00
cpu.c OPP: Use consistent names for OPP table instances 2022-07-08 11:27:50 +05:30
debugfs.c OPP: debugfs: Fix warning around icc_get_name() 2024-03-26 18:20:42 -04:00
of.c OPP updates for 5.20-rc1 2022-08-03 17:49:38 +02:00
opp.h OPP: Don't drop opp->np reference while it is still in use 2022-07-19 11:07:02 +05:30
ti-opp-supply.c OPP: ti: Migrate to dev_pm_opp_set_config_regulators() 2022-07-08 11:27:49 +05:30