lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190617130428.1887747-1-arnd@arndb.de>
Date:   Mon, 17 Jun 2019 15:04:14 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Souptick Joarder <jrdr.linux@...il.com>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] hwtracing: msu: fix unused variable warning

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@...db.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ