public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rcu: avoid checking for constant
@ 2012-01-12  5:11 Jan Engelhardt
  2012-01-12  7:14 ` Josh Triplett
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Engelhardt @ 2012-01-12  5:11 UTC (permalink / raw)
  To: paulmck; +Cc: laijs, manfred, dhowells, josh, linux-kernel, jengelh

When compiling kernel or module code with -O0, "offset" is no longer
considered a constant, and therefore always triggers the build error
that BUILD_BUG_ON is defined to yield.

What is the rationale between the forced constant check,
introduced in 9ab1544eb4196ca8d05c433b2eb56f74496b1ee3?

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 include/linux/rcupdate.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 2cf4226..38c5ba5 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -805,8 +805,6 @@ void __kfree_rcu(struct rcu_head *head, unsigned long offset)
 {
 	typedef void (*rcu_callback)(struct rcu_head *);
 
-	BUILD_BUG_ON(!__builtin_constant_p(offset));
-
 	/* See the kfree_rcu() header comment. */
 	BUILD_BUG_ON(!__is_kfree_rcu_offset(offset));
 
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-04-19 18:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-12  5:11 [PATCH] rcu: avoid checking for constant Jan Engelhardt
2012-01-12  7:14 ` Josh Triplett
2012-01-12  9:25   ` Jan Engelhardt
2012-01-12  9:52     ` Josh Triplett
2012-01-12 10:34       ` Jan Engelhardt
2012-01-12 10:54         ` Eric Dumazet
2012-01-12 10:57           ` Jan Engelhardt
2012-01-12 15:29             ` Paul E. McKenney
2012-01-12 16:08               ` Jan Engelhardt
2012-01-12 16:14                 ` Eric Dumazet
2012-01-12 11:58         ` Josh Triplett
2012-01-12 15:38           ` Jan Engelhardt
2012-01-12 18:41             ` Josh Triplett
2012-04-19 18:57               ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox