From: Nathan Huckleberry <nhuck@google.com>
To: nick@shmanahar.org, dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Nathan Huckleberry <nhuck@google.com>,
clang-built-linux@googlegroups.com
Subject: [PATCH] Input: atmel_mxt_ts - fix -Wunused-const-variable
Date: Wed, 12 Jun 2019 16:58:03 -0700 [thread overview]
Message-ID: <20190612235803.9290-1-nhuck@google.com> (raw)
Clang produces the following warning
drivers/input/touchscreen/atmel_mxt_ts.c:259:42: warning: unused
variable 'mxt_video_fops' [-Wunused-const-variable]
static const struct v4l2_file_operations mxt_video_fops = {
Since mxt_video_fops is only used inside an ifdef. It should
be moved inside the ifdef.
Cc: clang-built-linux@googlegroups.com
Link: https://github.com/ClangBuiltLinux/linux/issues/527
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 19378f200c63..48411c83320b 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -256,6 +256,7 @@ enum v4l_dbg_inputs {
MXT_V4L_INPUT_MAX,
};
+#ifdef CONFIG_TOUCHSCREEN_ATMEL_MXT_T37
static const struct v4l2_file_operations mxt_video_fops = {
.owner = THIS_MODULE,
.open = v4l2_fh_open,
@@ -265,6 +266,7 @@ static const struct v4l2_file_operations mxt_video_fops = {
.mmap = vb2_fop_mmap,
.poll = vb2_fop_poll,
};
+#endif
enum mxt_suspend_mode {
MXT_SUSPEND_DEEP_SLEEP = 0,
--
2.22.0.rc2.383.gf4fbbf30c2-goog
next reply other threads:[~2019-06-12 23:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 23:58 Nathan Huckleberry [this message]
2019-06-13 17:47 ` [PATCH] Input: atmel_mxt_ts - fix -Wunused-const-variable Nick Desaulniers
2019-06-13 18:23 ` [PATCH v2] " Nathan Huckleberry
2019-06-13 18:26 ` Nick Desaulniers
2019-07-01 8:19 ` Dmitry Torokhov
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=20190612235803.9290-1-nhuck@google.com \
--to=nhuck@google.com \
--cc=clang-built-linux@googlegroups.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@shmanahar.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;
as well as URLs for NNTP newsgroup(s).