From: Nathan Huckleberry <nhuck@google.com>
To: thierry.reding@gmail.com, jonathanh@nvidia.com
Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
Nathan Huckleberry <nhuck@google.com>,
clang-built-linux@googlegroups.com
Subject: [PATCH] memory: tegra: Fix -Wunused-const-variable
Date: Thu, 13 Jun 2019 10:27:46 -0700 [thread overview]
Message-ID: <20190613172746.216819-1-nhuck@google.com> (raw)
Clang produces the following warning
drivers/memory/tegra/tegra124.c:36:28: warning: unused variable
'tegra124_mc_emem_regs' [-Wunused-const-variable]
static const unsigned long tegra124_mc_emem_regs[] = {
^
The only usage of this variable is from within an ifdef.
It seems logical to move the variable into the ifdef as well.
Cc: clang-built-linux@googlegroups.com
Link: https://github.com/ClangBuiltLinux/linux/issues/526
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
---
drivers/memory/tegra/tegra124.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/memory/tegra/tegra124.c b/drivers/memory/tegra/tegra124.c
index 8f8487bda642..8f2af5614595 100644
--- a/drivers/memory/tegra/tegra124.c
+++ b/drivers/memory/tegra/tegra124.c
@@ -33,6 +33,7 @@
#define MC_EMEM_ARB_MISC1 0xdc
#define MC_EMEM_ARB_RING1_THROTTLE 0xe0
+#ifdef CONFIG_ARCH_TEGRA_124_SOC
static const unsigned long tegra124_mc_emem_regs[] = {
MC_EMEM_ARB_CFG,
MC_EMEM_ARB_OUTSTANDING_REQ,
@@ -54,6 +55,7 @@ static const unsigned long tegra124_mc_emem_regs[] = {
MC_EMEM_ARB_MISC1,
MC_EMEM_ARB_RING1_THROTTLE
};
+#endif
static const struct tegra_mc_client tegra124_mc_clients[] = {
{
--
2.22.0.rc2.383.gf4fbbf30c2-goog
next reply other threads:[~2019-06-13 17:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 17:27 Nathan Huckleberry [this message]
2019-06-13 17:57 ` [PATCH] memory: tegra: Fix -Wunused-const-variable Nick Desaulniers
2019-06-13 18:26 ` [PATCH v2] " Nathan Huckleberry
2019-06-13 18:27 ` Nick Desaulniers
2019-06-14 16:02 ` Thierry Reding
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=20190613172746.216819-1-nhuck@google.com \
--to=nhuck@google.com \
--cc=clang-built-linux@googlegroups.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.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