Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (sparx5) Make symbol 's5_temp_match' static

The sparse tool complains as follows:

drivers/hwmon/sparx5-temp.c:150:27: warning:
symbol 's5_temp_match' was not declared. Should it be static?

This variable is not used outside of sparx5-temp.c, this commit
marks it static.

Fixes: c2cb4b5777e1 ("hwmon: sparx5: Add Sparx5 SoC temperature driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20200721134919.34033-1-weiyongjun1@huawei.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Wei Yongjun and committed by
Guenter Roeck
2fdf8f7f fa4dac3e

+1 -1
+1 -1
drivers/hwmon/sparx5-temp.c
··· 147 147 return PTR_ERR_OR_ZERO(hwmon_dev); 148 148 } 149 149 150 - const struct of_device_id s5_temp_match[] = { 150 + static const struct of_device_id s5_temp_match[] = { 151 151 { .compatible = "microchip,sparx5-temp" }, 152 152 {}, 153 153 };