linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] leds: cht-wcove: set function cht_wc_leds_brightness_get storage-class-specifier to static
@ 2023-05-30 23:47 Tom Rix
  2023-06-08 14:57 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-05-30 23:47 UTC (permalink / raw)
  To: pavel, lee; +Cc: linux-leds, linux-kernel, Tom Rix

smatch reports
drivers/leds/leds-cht-wcove.c:144:21: warning: symbol
  'cht_wc_leds_brightness_get' was not declared. Should it be static?

This function is only used in its defining file, so it should be static.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/leds/leds-cht-wcove.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/leds-cht-wcove.c b/drivers/leds/leds-cht-wcove.c
index 0cfebee98910..0a5c30e5ed5d 100644
--- a/drivers/leds/leds-cht-wcove.c
+++ b/drivers/leds/leds-cht-wcove.c
@@ -141,7 +141,7 @@ static int cht_wc_leds_brightness_set(struct led_classdev *cdev,
 	return ret;
 }
 
-enum led_brightness cht_wc_leds_brightness_get(struct led_classdev *cdev)
+static enum led_brightness cht_wc_leds_brightness_get(struct led_classdev *cdev)
 {
 	struct cht_wc_led *led = container_of(cdev, struct cht_wc_led, cdev);
 	unsigned int val;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] leds: cht-wcove: set function cht_wc_leds_brightness_get storage-class-specifier to static
  2023-05-30 23:47 [PATCH] leds: cht-wcove: set function cht_wc_leds_brightness_get storage-class-specifier to static Tom Rix
@ 2023-06-08 14:57 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2023-06-08 14:57 UTC (permalink / raw)
  To: Tom Rix; +Cc: pavel, linux-leds, linux-kernel

On Tue, 30 May 2023, Tom Rix wrote:

> smatch reports
> drivers/leds/leds-cht-wcove.c:144:21: warning: symbol
>   'cht_wc_leds_brightness_get' was not declared. Should it be static?
> 
> This function is only used in its defining file, so it should be static.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  drivers/leds/leds-cht-wcove.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Sorry, you were pipped to the post:

https://lore.kernel.org/r/20230525183317.129232-1-hdegoede@redhat.com

-- 
Lee Jones [李琼斯]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-08 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-30 23:47 [PATCH] leds: cht-wcove: set function cht_wc_leds_brightness_get storage-class-specifier to static Tom Rix
2023-06-08 14:57 ` Lee Jones

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).