From: Arnd Bergmann <arnd@arndb.de>
To: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Souptick Joarder <jrdr.linux@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] hwtracing: msu: fix unused variable warning
Date: Mon, 17 Jun 2019 15:04:14 +0200 [thread overview]
Message-ID: <20190617130428.1887747-1-arnd@arndb.de> (raw)
On non-x86 builds, we now get a harmless warning:
drivers/hwtracing/intel_th/msu.c:783:21: error: unused variable 'i' [-Werror,-Wunused-variable]
int ret = -ENOMEM, i;
^
drivers/hwtracing/intel_th/msu.c:863:6: error: unused variable 'i' [-Werror,-Wunused-variable]
int i;
^
Add the matching #ifdef.
Fixes: ba39bd830605 ("intel_th: msu: Switch over to scatterlist")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/hwtracing/intel_th/msu.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
index 81bb54fa3ce8..833a5a8f13ad 100644
--- a/drivers/hwtracing/intel_th/msu.c
+++ b/drivers/hwtracing/intel_th/msu.c
@@ -780,7 +780,10 @@ static int __msc_buffer_win_alloc(struct msc_window *win,
static int msc_buffer_win_alloc(struct msc *msc, unsigned int nr_blocks)
{
struct msc_window *win;
- int ret = -ENOMEM, i;
+ int ret = -ENOMEM;
+#ifdef CONFIG_X86
+ int i;
+#endif
if (!nr_blocks)
return 0;
@@ -860,7 +863,9 @@ static void __msc_buffer_win_free(struct msc *msc, struct msc_window *win)
*/
static void msc_buffer_win_free(struct msc *msc, struct msc_window *win)
{
+#ifdef CONFIG_X86
int i;
+#endif
msc->nr_pages -= win->nr_blocks;
--
2.20.0
reply other threads:[~2019-06-17 13:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190617130428.1887747-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=alexander.shishkin@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jrdr.linux@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®