From: Jinjie Ruan Date: Mon, 2 Sep 2024 11:06:54 +0000 (+0800) Subject: rcu: Use the BITS_PER_LONG macro X-Git-Tag: v6.13-rc1~190^2~10 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=5d2501f42cf8caad1abb44a37f20195a52e1cf07;p=linux-block.git rcu: Use the BITS_PER_LONG macro sizeof(unsigned long) * 8 is the number of bits in an unsigned long variable, replace it with BITS_PER_LONG macro to make it simpler. Signed-off-by: Jinjie Ruan Reviewed-by: "Paul E. McKenney" Signed-off-by: Neeraj Upadhyay Signed-off-by: Frederic Weisbecker --- diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index b1f883fcd918..38b121a77366 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -5580,8 +5580,7 @@ void rcu_init_geometry(void) * Complain and fall back to the compile-time values if this * limit is exceeded. */ - if (rcu_fanout_leaf < 2 || - rcu_fanout_leaf > sizeof(unsigned long) * 8) { + if (rcu_fanout_leaf < 2 || rcu_fanout_leaf > BITS_PER_LONG) { rcu_fanout_leaf = RCU_FANOUT_LEAF; WARN_ON(1); return;