Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rcu: Convert "1UL << x" to "BIT(x)"

This commit saves a few characters by converting "1UL << x" to "BIT(x)".

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

+2 -2
+1 -1
kernel/rcu/tree.c
··· 3582 3582 rnp->parent = NULL; 3583 3583 } else { 3584 3584 rnp->grpnum = j % levelspread[i - 1]; 3585 - rnp->grpmask = 1UL << rnp->grpnum; 3585 + rnp->grpmask = BIT(rnp->grpnum); 3586 3586 rnp->parent = rcu_state.level[i - 1] + 3587 3587 j / levelspread[i - 1]; 3588 3588 }
+1 -1
kernel/rcu/tree.h
··· 168 168 * are indexed relative to this interval rather than the global CPU ID space. 169 169 * This generates the bit for a CPU in node-local masks. 170 170 */ 171 - #define leaf_node_cpu_bit(rnp, cpu) (1UL << ((cpu) - (rnp)->grplo)) 171 + #define leaf_node_cpu_bit(rnp, cpu) (BIT((cpu) - (rnp)->grplo)) 172 172 173 173 /* 174 174 * Union to allow "aggregate OR" operation on the need for a quiescent