leds: flash: Set variables mvflash_{3,4}ch_regs storage-class-specifier to static
authorTom Rix <trix@redhat.com>
Fri, 17 Mar 2023 19:13:41 +0000 (15:13 -0400)
committerLee Jones <lee@kernel.org>
Thu, 30 Mar 2023 12:58:24 +0000 (13:58 +0100)
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 locally, so it should be static.

Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230317191341.1670660-1-trix@redhat.com
drivers/leds/flash/leds-qcom-flash.c

index 406ed8761c783bfc39bfaf1c6a473800c9aff038..90a24fa25a494ef3d692ae2c5c301023c6ac0325 100644 (file)
@@ -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      */