* [PATCH] bug: Avoid setting BUGFLAG_WARNING twice
@ 2017-04-10 8:49 Peter Zijlstra
2017-04-14 9:27 ` [tip:x86/asm] debug: " tip-bot for Peter Zijlstra
0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2017-04-10 8:49 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Ingo Molnar, linux-kernel
[resend, with Dan's actual email address]
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>
---
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 5fe9f39cec44..d6f4aed479a1 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:x86/asm] debug: Avoid setting BUGFLAG_WARNING twice
2017-04-10 8:49 [PATCH] bug: Avoid setting BUGFLAG_WARNING twice Peter Zijlstra
@ 2017-04-14 9:27 ` tip-bot for Peter Zijlstra
0 siblings, 0 replies; 3+ messages in thread
From: tip-bot for Peter Zijlstra @ 2017-04-14 9:27 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, torvalds, dan.carpenter, hpa, mingo, peterz, tglx
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] bug: Avoid setting BUGFLAG_WARNING twice
@ 2017-04-10 8:46 Peter Zijlstra
0 siblings, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2017-04-10 8:46 UTC (permalink / raw)
To: error27; +Cc: Ingo Molnar, linux-kernel
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>
---
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 5fe9f39cec44..d6f4aed479a1 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-14 9:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10 8:49 [PATCH] bug: Avoid setting BUGFLAG_WARNING twice Peter Zijlstra
2017-04-14 9:27 ` [tip:x86/asm] debug: " tip-bot for Peter Zijlstra
-- strict thread matches above, loose matches on Subject: below --
2017-04-10 8:46 [PATCH] bug: " Peter Zijlstra
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.