linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] leds: flash: set varaiables mvflash_3,4ch_regs storage-class-specifier to static
@ 2023-03-17 19:13 Tom Rix
  2023-03-23 19:47 ` Pavel Machek
  2023-03-30 13:00 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Rix @ 2023-03-17 19:13 UTC (permalink / raw)
  To: pavel, lee, quic_fenglinw; +Cc: linux-leds, linux-kernel, Tom Rix

smatch reports
drivers/leds/flash/leds-qcom-flash.c:103:18: warning:
  symbol 'mvflash_3ch_regs' was not declared. Should it be static?
drivers/leds/flash/leds-qcom-flash.c:115:18: warning:
  symbol 'mvflash_4ch_regs' was not declared. Should it be static?

These variables are only used in leds-qcom-flash.c,
so it should be static.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/leds/flash/leds-qcom-flash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/flash/leds-qcom-flash.c b/drivers/leds/flash/leds-qcom-flash.c
index 406ed8761c78..90a24fa25a49 100644
--- a/drivers/leds/flash/leds-qcom-flash.c
+++ b/drivers/leds/flash/leds-qcom-flash.c
@@ -100,7 +100,7 @@ enum {
 	REG_MAX_COUNT,
 };
 
-struct reg_field mvflash_3ch_regs[REG_MAX_COUNT] = {
+static struct reg_field mvflash_3ch_regs[REG_MAX_COUNT] = {
 	REG_FIELD(0x08, 0, 7),			/* status1	*/
 	REG_FIELD(0x09, 0, 7),                  /* status2	*/
 	REG_FIELD(0x0a, 0, 7),                  /* status3	*/
@@ -112,7 +112,7 @@ struct reg_field mvflash_3ch_regs[REG_MAX_COUNT] = {
 	REG_FIELD(0x4c, 0, 2),                  /* chan_en	*/
 };
 
-struct reg_field mvflash_4ch_regs[REG_MAX_COUNT] = {
+static struct reg_field mvflash_4ch_regs[REG_MAX_COUNT] = {
 	REG_FIELD(0x06, 0, 7),			/* status1	*/
 	REG_FIELD(0x07, 0, 6),			/* status2	*/
 	REG_FIELD(0x09, 0, 7),			/* status3	*/
-- 
2.27.0


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

* Re: [PATCH] leds: flash: set varaiables mvflash_3,4ch_regs storage-class-specifier to static
  2023-03-17 19:13 [PATCH] leds: flash: set varaiables mvflash_3,4ch_regs storage-class-specifier to static Tom Rix
@ 2023-03-23 19:47 ` Pavel Machek
  2023-03-30 13:00 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2023-03-23 19:47 UTC (permalink / raw)
  To: Tom Rix; +Cc: lee, quic_fenglinw, linux-leds, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

On Fri 2023-03-17 15:13:41, Tom Rix wrote:
> smatch reports
> drivers/leds/flash/leds-qcom-flash.c:103:18: warning:
>   symbol 'mvflash_3ch_regs' was not declared. Should it be static?
> drivers/leds/flash/leds-qcom-flash.c:115:18: warning:
>   symbol 'mvflash_4ch_regs' was not declared. Should it be static?
> 
> These variables are only used in leds-qcom-flash.c,
> so it should be static.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Acked-by: Pavel Machek <pavel@ucw.cz>

BR,
								Pavel
								
-- 
People of Russia, stop Putin before his war on Ukraine escalates.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: [PATCH] leds: flash: set varaiables mvflash_3,4ch_regs storage-class-specifier to static
  2023-03-17 19:13 [PATCH] leds: flash: set varaiables mvflash_3,4ch_regs storage-class-specifier to static Tom Rix
  2023-03-23 19:47 ` Pavel Machek
@ 2023-03-30 13:00 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2023-03-30 13:00 UTC (permalink / raw)
  To: Tom Rix; +Cc: pavel, quic_fenglinw, linux-leds, linux-kernel

On Fri, 17 Mar 2023, Tom Rix wrote:

> smatch reports
> drivers/leds/flash/leds-qcom-flash.c:103:18: warning:
>   symbol 'mvflash_3ch_regs' was not declared. Should it be static?
> drivers/leds/flash/leds-qcom-flash.c:115:18: warning:
>   symbol 'mvflash_4ch_regs' was not declared. Should it be static?
>
> These variables are only used in leds-qcom-flash.c,
> so it should be static.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  drivers/leds/flash/leds-qcom-flash.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

I fixed-up some spelling / formatting issues and ...

Applied, thanks

--
Lee Jones [李琼斯]

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

end of thread, other threads:[~2023-03-30 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-17 19:13 [PATCH] leds: flash: set varaiables mvflash_3,4ch_regs storage-class-specifier to static Tom Rix
2023-03-23 19:47 ` Pavel Machek
2023-03-30 13:00 ` 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).