From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
To: linux-clk@vger.kernel.org
Cc: tsbogend@alpha.franken.de, sboyd@kernel.org,
mturquette@baylibre.com, linux-kernel@vger.kernel.org,
ndesaulniers@google.com, kernel test robot <lkp@intel.com>
Subject: [PATCH] clk: ralink: mtmips: quiet unused variable warning
Date: Wed, 2 Aug 2023 11:26:47 +0200 [thread overview]
Message-ID: <20230802092647.3000666-1-sergio.paracuellos@gmail.com> (raw)
When CONFIG_OF is disabled then the matching table is not referenced and
the following warning appears:
drivers/clk/ralink/clk-mtmips.c:821:34: warning: unused variable 'mtmips_of_match' [-Wunused-const-variable]
821 | static const struct of_device_id mtmips_of_match[] = {
| ^
Silence it declaring 'mtmips_of_match' with '__maybe_unused'.
Fixes: 6f3b15586eef ("clk: ralink: add clock and reset driver for MTMIPS SoCs")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307242310.CdOnd2py-lkp@intel.com/
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
drivers/clk/ralink/clk-mtmips.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/ralink/clk-mtmips.c b/drivers/clk/ralink/clk-mtmips.c
index 1e7991439527..6716394b28a3 100644
--- a/drivers/clk/ralink/clk-mtmips.c
+++ b/drivers/clk/ralink/clk-mtmips.c
@@ -820,7 +820,7 @@ static const struct mtmips_clk_data mt76x8_clk_data = {
.num_clk_periph = ARRAY_SIZE(mt76x8_pherip_clks),
};
-static const struct of_device_id mtmips_of_match[] = {
+static const __maybe_unused struct of_device_id mtmips_of_match[] = {
{
.compatible = "ralink,rt2880-sysc",
.data = &rt2880_clk_data,
--
2.25.1
next reply other threads:[~2023-08-02 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-02 9:26 Sergio Paracuellos [this message]
2023-08-02 21:26 ` [PATCH] clk: ralink: mtmips: quiet unused variable warning Nick Desaulniers
2023-08-02 21:32 ` Nathan Chancellor
2023-08-02 22:01 ` Arnd Bergmann
[not found] ` <CAMhs-H-2g2QF8NjZOknEop_3UFc_R3YYhpEveU2fc-Ks-iM1bA@mail.gmail.com>
2023-08-03 7:58 ` Arnd Bergmann
2023-08-27 1:23 ` Sergio Paracuellos
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=20230802092647.3000666-1-sergio.paracuellos@gmail.com \
--to=sergio.paracuellos@gmail.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mturquette@baylibre.com \
--cc=ndesaulniers@google.com \
--cc=sboyd@kernel.org \
--cc=tsbogend@alpha.franken.de \
/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