hwmon: (sparx5) Make symbol 's5_temp_match' static
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 21 Jul 2020 13:49:19 +0000 (21:49 +0800)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 24 Jul 2020 14:44:57 +0000 (07:44 -0700)
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>
drivers/hwmon/sparx5-temp.c

index 7d7a060259a8006e08763157ce80f62cc488faa2..1a2b1026b026440409ec3d603ef38ec8efde84f4 100644 (file)
@@ -147,7 +147,7 @@ static int s5_temp_probe(struct platform_device *pdev)
        return PTR_ERR_OR_ZERO(hwmon_dev);
 }
 
-const struct of_device_id s5_temp_match[] = {
+static const struct of_device_id s5_temp_match[] = {
        { .compatible = "microchip,sparx5-temp" },
        {},
 };