From: cy_huang <u0084500@gmail.com>
To: lgirdwood@gmail.com, broonie@kernel.org
Cc: cy_huang@richtek.com, gene_chen@richtek.com,
linux-kernel@vger.kernel.org
Subject: [PATCH] regulator: rt4801: Fix W=1 build warning when CONFIG_OF=n
Date: Mon, 24 Aug 2020 10:05:13 +0800 [thread overview]
Message-ID: <1598234713-8532-1-git-send-email-u0084500@gmail.com> (raw)
From: ChiYuan Huang <cy_huang@richtek.com>
Fix below warning when CONFIG_OF=n:
drivers/regulator/rt4801-regulator.c:206:34: warning: unused variable 'rt4801_of_id' [-Wunused-const-variable]
206 | static const struct of_device_id rt4801_of_id[] = {
| ^~~~~~~~~~~~
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Reported-by: kernel test robot <lkp@intel.com>
---
drivers/regulator/rt4801-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/rt4801-regulator.c b/drivers/regulator/rt4801-regulator.c
index 0ddc670..2055a9c 100644
--- a/drivers/regulator/rt4801-regulator.c
+++ b/drivers/regulator/rt4801-regulator.c
@@ -203,7 +203,7 @@ static int rt4801_probe(struct i2c_client *i2c)
return 0;
}
-static const struct of_device_id rt4801_of_id[] = {
+static const struct of_device_id __maybe_unused rt4801_of_id[] = {
{ .compatible = "richtek,rt4801", },
{ },
};
--
2.7.4
next reply other threads:[~2020-08-24 2:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 2:05 cy_huang [this message]
2020-08-24 13:31 ` Mark Brown
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=1598234713-8532-1-git-send-email-u0084500@gmail.com \
--to=u0084500@gmail.com \
--cc=broonie@kernel.org \
--cc=cy_huang@richtek.com \
--cc=gene_chen@richtek.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®