From: Tom Rix <trix@redhat.com>
To: pavel@ucw.cz, lee@kernel.org, quic_fenglinw@quicinc.com
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
Tom Rix <trix@redhat.com>
Subject: [PATCH] leds: flash: set varaiables mvflash_3,4ch_regs storage-class-specifier to static
Date: Fri, 17 Mar 2023 15:13:41 -0400 [thread overview]
Message-ID: <20230317191341.1670660-1-trix@redhat.com> (raw)
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
next reply other threads:[~2023-03-17 19:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 19:13 Tom Rix [this message]
2023-03-23 19:47 ` [PATCH] leds: flash: set varaiables mvflash_3,4ch_regs storage-class-specifier to static Pavel Machek
2023-03-30 13:00 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230317191341.1670660-1-trix@redhat.com \
--to=trix@redhat.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=quic_fenglinw@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox