OpenCloudOS-Kernel/drivers/opp
Viresh Kumar b64a1b4f47 OPP: debugfs: Fix warning around icc_get_name()
[ Upstream commit 28330ceb953e39880ea77da4895bb902a1244860 ]

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:19:40 -04:00
..
Kconfig drivers/opp: Remove "select SRCU" 2023-01-05 11:47:21 +05:30
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
core.c OPP: Pass rounded rate to _set_opp() 2024-01-31 16:18:49 -08:00
cpu.c OPP: Fix argument name in doc comment 2023-08-18 10:55:49 +05:30
debugfs.c OPP: debugfs: Fix warning around icc_get_name() 2024-03-26 18:19:40 -04:00
of.c OPP: Properly propagate error along when failing to get icc_path 2023-06-27 07:35:14 +05:30
opp.h OPP: Simplify the over-designed pstate <-> level dance 2023-06-19 09:50:09 +05:30
ti-opp-supply.c OPP: ti: Migrate to dev_pm_opp_set_config_regulators() 2022-07-08 11:27:49 +05:30