]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rcu: Convert "1UL << x" to "BIT(x)"
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 31 Jul 2018 16:49:20 +0000 (09:49 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 30 Aug 2018 23:03:46 +0000 (16:03 -0700)
This commit saves a few characters by converting "1UL << x" to "BIT(x)".

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c
kernel/rcu/tree.h

index 92346ab8077d4d3a359974d313a5407805f395e1..e778fd5546d118fc87dfb20d7e32535d070c4504 100644 (file)
@@ -3582,7 +3582,7 @@ static void __init rcu_init_one(void)
                                rnp->parent = NULL;
                        } else {
                                rnp->grpnum = j % levelspread[i - 1];
-                               rnp->grpmask = 1UL << rnp->grpnum;
+                               rnp->grpmask = BIT(rnp->grpnum);
                                rnp->parent = rcu_state.level[i - 1] +
                                              j / levelspread[i - 1];
                        }
index 8f053bb1eec8c21a6cfe0250a12239e6088a6875..5e561f1339d4a83615907101109b04f245ff913f 100644 (file)
@@ -168,7 +168,7 @@ struct rcu_node {
  * are indexed relative to this interval rather than the global CPU ID space.
  * This generates the bit for a CPU in node-local masks.
  */
-#define leaf_node_cpu_bit(rnp, cpu) (1UL << ((cpu) - (rnp)->grplo))
+#define leaf_node_cpu_bit(rnp, cpu) (BIT((cpu) - (rnp)->grplo))
 
 /*
  * Union to allow "aggregate OR" operation on the need for a quiescent