Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1623606

[tip:x86/asm] debug: Avoid setting BUGFLAG_WARNING twice

Path csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From tip-bot for Peter Zijlstra <tipbot@zytor.com>
Newsgroups linux.kernel
Subject [tip:x86/asm] debug: Avoid setting BUGFLAG_WARNING twice
Date Fri, 14 Apr 2017 11:40:01 +0200
Message-ID <tw5RT-7Pb-5@gated-at.bofh.it> (permalink)
References <tuDbk-6MH-21@gated-at.bofh.it>
Reply-To tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org, dan.carpenter@oracle.com, hpa@zytor.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Git-Commit-ID f26dee15103f4040bfe21c910131db0cfe6624fc
X-Mailer tip-git-log-daemon
Robot-ID <tip-bot.git.kernel.org>
Robot-Unsubscribe Contact <mailto:hpa@kernel.org> to get blacklisted from these emails
MIME-Version 1.0
Content-Transfer-Encoding 8bit
Content-Type text/plain; charset=UTF-8
Content-Disposition inline
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 42
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, dan.carpenter@oracle.com, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, tglx@linutronix.de
X-Original-Date Fri, 14 Apr 2017 02:27:15 -0700
X-Original-Message-ID <tip-f26dee15103f4040bfe21c910131db0cfe6624fc@git.kernel.org>
X-Original-References <20170410084939.4bwhrvpmauwfzauq@hirez.programming.kicks-ass.net>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1623606

Show key headers only | View raw


Commit-ID:  f26dee15103f4040bfe21c910131db0cfe6624fc
Gitweb:     http://git.kernel.org/tip/f26dee15103f4040bfe21c910131db0cfe6624fc
Author:     Peter Zijlstra <peterz@infradead.org>
AuthorDate: Mon, 10 Apr 2017 10:49:39 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 14 Apr 2017 10:20:13 +0200

debug: Avoid setting BUGFLAG_WARNING twice

Dan reported that his static checking complains about BUGFLAG_WARNING
being set on both sides of the bitwise-or, it figures that that might've
been an unintentional mistake.

Since there are no architectures that implement __WARN_TAINT() (I
converted them all to implement __WARN_FLAGS()), and all __WARN_FLAGS()
implementations already set BUGFLAG_WARNING, we can remove the bit from
BUGFLAG_TAINT() and make Dan's checker happy.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170410084939.4bwhrvpmauwfzauq@hirez.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/asm-generic/bug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 5fe9f39..d6f4aed 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -7,7 +7,7 @@
 #define BUGFLAG_WARNING		(1 << 0)
 #define BUGFLAG_ONCE		(1 << 1)
 #define BUGFLAG_DONE		(1 << 2)
-#define BUGFLAG_TAINT(taint)	(BUGFLAG_WARNING | ((taint) << 8))
+#define BUGFLAG_TAINT(taint)	((taint) << 8)
 #define BUG_GET_TAINT(bug)	((bug)->flags >> 8)
 #endif
 

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[tip:x86/asm] debug: Avoid setting BUGFLAG_WARNING twice tip-bot for Peter Zijlstra <tipbot@zytor.com> - 2017-04-14 11:40 +0200

csiph-web