diff mbox series

[-next] hwmon: sparx5: Make symbol 's5_temp_match' static

Message ID 20200721134919.34033-1-weiyongjun1@huawei.com (mailing list archive)
State Accepted
Headers show
Series [-next] hwmon: sparx5: Make symbol 's5_temp_match' static | expand

Commit Message

Wei Yongjun July 21, 2020, 1:49 p.m. UTC
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>
---
 drivers/hwmon/sparx5-temp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Guenter Roeck July 21, 2020, 1:53 p.m. UTC | #1
On Tue, Jul 21, 2020 at 09:49:19PM +0800, Wei Yongjun wrote:
> 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>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/sparx5-temp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/sparx5-temp.c b/drivers/hwmon/sparx5-temp.c
> index 7d7a060259a8..1a2b1026b026 100644
> --- a/drivers/hwmon/sparx5-temp.c
> +++ b/drivers/hwmon/sparx5-temp.c
> @@ -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" },
>  	{},
>  };
diff mbox series

Patch

diff --git a/drivers/hwmon/sparx5-temp.c b/drivers/hwmon/sparx5-temp.c
index 7d7a060259a8..1a2b1026b026 100644
--- a/drivers/hwmon/sparx5-temp.c
+++ b/drivers/hwmon/sparx5-temp.c
@@ -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" },
 	{},
 };