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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-b016d870cadae31d7c5eb2eef794d2e733f6595c@git.kernel.org>
Date:   Mon, 5 Jun 2017 02:04:04 -0700
From:   tip-bot for Ben Hutchings <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     peterz@...radead.org, sasha.levin@...cle.com, ben@...adent.org.uk,
        hpa@...or.com, linux-kernel@...r.kernel.org, mingo@...nel.org,
        torvalds@...ux-foundation.org, tglx@...utronix.de
Subject: [tip:locking/core] tools/lib/lockdep: Fix 'set but not used'
 warnings

Commit-ID:  b016d870cadae31d7c5eb2eef794d2e733f6595c
Gitweb:     http://git.kernel.org/tip/b016d870cadae31d7c5eb2eef794d2e733f6595c
Author:     Ben Hutchings <ben@...adent.org.uk>
AuthorDate: Thu, 25 May 2017 12:58:38 +0000
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 5 Jun 2017 09:28:06 +0200

tools/lib/lockdep: Fix 'set but not used' warnings

liblockdep defines trivial macros for working with interrupt flags, as
interrupts are never disabled in userland.  This results in warnings
from gcc when -Wunused-but-set-variable is enabled, and it is enabled
by -Wall.  Fix this by evaluating the flags parameter and casting it to
void.

Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@...cle.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: a.p.zijlstra@...llo.nl
Link: http://lkml.kernel.org/r/20170525130005.5947-7-alexander.levin@verizon.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 tools/lib/lockdep/uinclude/linux/irqflags.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/lib/lockdep/uinclude/linux/irqflags.h b/tools/lib/lockdep/uinclude/linux/irqflags.h
index 6cc296f..df77669 100644
--- a/tools/lib/lockdep/uinclude/linux/irqflags.h
+++ b/tools/lib/lockdep/uinclude/linux/irqflags.h
@@ -17,19 +17,19 @@
 #define raw_local_irq_disable() do { } while (0)
 #define raw_local_irq_enable() do { } while (0)
 #define raw_local_irq_save(flags) ((flags) = 0)
-#define raw_local_irq_restore(flags) do { } while (0)
+#define raw_local_irq_restore(flags) ((void)(flags))
 #define raw_local_save_flags(flags) ((flags) = 0)
-#define raw_irqs_disabled_flags(flags) do { } while (0)
+#define raw_irqs_disabled_flags(flags) ((void)(flags))
 #define raw_irqs_disabled() 0
 #define raw_safe_halt()
 
 #define local_irq_enable() do { } while (0)
 #define local_irq_disable() do { } while (0)
 #define local_irq_save(flags) ((flags) = 0)
-#define local_irq_restore(flags) do { } while (0)
+#define local_irq_restore(flags) ((void)(flags))
 #define local_save_flags(flags)	((flags) = 0)
 #define irqs_disabled() (1)
-#define irqs_disabled_flags(flags) (0)
+#define irqs_disabled_flags(flags) ((void)(flags), 0)
 #define safe_halt() do { } while (0)
 
 #define trace_lock_release(x, y)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ