rcu: Use IS_ENABLED() to simplify rcu_bootup_announce_oddness()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 22 Jan 2015 00:58:06 +0000 (16:58 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 3 Mar 2015 19:16:20 +0000 (11:16 -0800)
This commit gets rid of some inline #ifdefs by replacing them with
IS_ENABLED.

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

index 8a33920b8845f2a91a24712b2d9f332edc2b9f77..81c4d91fa18a81ce5c773da186ae1d638b7d9664 100644 (file)
@@ -58,38 +58,30 @@ static bool __read_mostly rcu_nocb_poll;    /* Offload kthread are to poll. */
  */
 static void __init rcu_bootup_announce_oddness(void)
 {
-#ifdef CONFIG_RCU_TRACE
-       pr_info("\tRCU debugfs-based tracing is enabled.\n");
-#endif
-#if (defined(CONFIG_64BIT) && CONFIG_RCU_FANOUT != 64) || (!defined(CONFIG_64BIT) && CONFIG_RCU_FANOUT != 32)
-       pr_info("\tCONFIG_RCU_FANOUT set to non-default value of %d\n",
-              CONFIG_RCU_FANOUT);
-#endif
-#ifdef CONFIG_RCU_FANOUT_EXACT
-       pr_info("\tHierarchical RCU autobalancing is disabled.\n");
-#endif
-#ifdef CONFIG_RCU_FAST_NO_HZ
-       pr_info("\tRCU dyntick-idle grace-period acceleration is enabled.\n");
-#endif
-#ifdef CONFIG_PROVE_RCU
-       pr_info("\tRCU lockdep checking is enabled.\n");
-#endif
-#ifdef CONFIG_RCU_TORTURE_TEST_RUNNABLE
-       pr_info("\tRCU torture testing starts during boot.\n");
-#endif
-#if defined(CONFIG_RCU_CPU_STALL_INFO)
-       pr_info("\tAdditional per-CPU info printed with stalls.\n");
-#endif
-#if NUM_RCU_LVL_4 != 0
-       pr_info("\tFour-level hierarchy is enabled.\n");
-#endif
+       if (IS_ENABLED(CONFIG_RCU_TRACE))
+               pr_info("\tRCU debugfs-based tracing is enabled.\n");
+       if ((IS_ENABLED(CONFIG_64BIT) && CONFIG_RCU_FANOUT != 64) ||
+           (!IS_ENABLED(CONFIG_64BIT) && CONFIG_RCU_FANOUT != 32))
+               pr_info("\tCONFIG_RCU_FANOUT set to non-default value of %d\n",
+                      CONFIG_RCU_FANOUT);
+       if (IS_ENABLED(CONFIG_RCU_FANOUT_EXACT))
+               pr_info("\tHierarchical RCU autobalancing is disabled.\n");
+       if (IS_ENABLED(CONFIG_RCU_FAST_NO_HZ))
+               pr_info("\tRCU dyntick-idle grace-period acceleration is enabled.\n");
+       if (IS_ENABLED(CONFIG_PROVE_RCU))
+               pr_info("\tRCU lockdep checking is enabled.\n");
+       if (IS_ENABLED(CONFIG_RCU_TORTURE_TEST_RUNNABLE))
+               pr_info("\tRCU torture testing starts during boot.\n");
+       if (IS_ENABLED(CONFIG_RCU_CPU_STALL_INFO))
+               pr_info("\tAdditional per-CPU info printed with stalls.\n");
+       if (NUM_RCU_LVL_4 != 0)
+               pr_info("\tFour-level hierarchy is enabled.\n");
        if (rcu_fanout_leaf != CONFIG_RCU_FANOUT_LEAF)
                pr_info("\tBoot-time adjustment of leaf fanout to %d.\n", rcu_fanout_leaf);
        if (nr_cpu_ids != NR_CPUS)
                pr_info("\tRCU restricting CPUs from NR_CPUS=%d to nr_cpu_ids=%d.\n", NR_CPUS, nr_cpu_ids);
-#ifdef CONFIG_RCU_BOOST
-       pr_info("\tRCU kthread priority: %d.\n", kthread_prio);
-#endif
+       if (IS_ENABLED(CONFIG_RCU_BOOST))
+               pr_info("\tRCU kthread priority: %d.\n", kthread_prio);
 }
 
 #ifdef CONFIG_PREEMPT_RCU