Skip to content

Commit 5d2501f

Browse files
Jinjie RuanFrederic Weisbecker
authored andcommitted
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 <[email protected]> Reviewed-by: "Paul E. McKenney" <[email protected]> Signed-off-by: Neeraj Upadhyay <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]>
1 parent c329120 commit 5d2501f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/rcu/tree.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5580,8 +5580,7 @@ void rcu_init_geometry(void)
55805580
* Complain and fall back to the compile-time values if this
55815581
* limit is exceeded.
55825582
*/
5583-
if (rcu_fanout_leaf < 2 ||
5584-
rcu_fanout_leaf > sizeof(unsigned long) * 8) {
5583+
if (rcu_fanout_leaf < 2 || rcu_fanout_leaf > BITS_PER_LONG) {
55855584
rcu_fanout_leaf = RCU_FANOUT_LEAF;
55865585
WARN_ON(1);
55875586
return;

0 commit comments

Comments
 (0)