* [PATCH -next] hwmon: sparx5: Make symbol 's5_temp_match' static
@ 2020-07-21 13:49 Wei Yongjun
2020-07-21 13:53 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2020-07-21 13:49 UTC (permalink / raw)
To: Hulk Robot, Jean Delvare, Guenter Roeck, Lars Povlsen
Cc: Wei Yongjun, linux-hwmon
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(-)
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" },
{},
};
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] hwmon: sparx5: Make symbol 's5_temp_match' static
2020-07-21 13:49 [PATCH -next] hwmon: sparx5: Make symbol 's5_temp_match' static Wei Yongjun
@ 2020-07-21 13:53 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2020-07-21 13:53 UTC (permalink / raw)
To: Wei Yongjun; +Cc: Hulk Robot, Jean Delvare, Lars Povlsen, linux-hwmon
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" },
> {},
> };
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-21 13:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21 13:49 [PATCH -next] hwmon: sparx5: Make symbol 's5_temp_match' static Wei Yongjun
2020-07-21 13:53 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).