Linux-Hwmon Archive on lore.kernel.org
 help / color / Atom feed
* [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	[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, back to index

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

Linux-Hwmon Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-hwmon/0 linux-hwmon/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-hwmon linux-hwmon/ https://lore.kernel.org/linux-hwmon \
		linux-hwmon@vger.kernel.org
	public-inbox-index linux-hwmon

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-hwmon


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git