aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-11-08 02:35:00 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-12-07 20:01:33 -0500
commit45fed3e7cfb4001c80cd4bd25249d194a52bfed3 (patch)
treeb157d20629442ce64d3691867010db33b5c718c3 /kernel/rcu/tree.c
parente11f13355b09df970495c45ed0eac1dc85dcf5c1 (diff)
rcu: Make rcu_gp_init() be bool rather than int
The return value from rcu_gp_init() is always used as a bool, so this commit makes it be a bool. Reported-by: Iftekhar Ahmed <ahmedi@oregonstate.edu> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 87b604d0b0d2..01a90a3bdf79 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1814,9 +1814,9 @@ static void rcu_gp_slow(struct rcu_state *rsp, int delay)
1814} 1814}
1815 1815
1816/* 1816/*
1817 * Initialize a new grace period. Return 0 if no grace period required. 1817 * Initialize a new grace period. Return false if no grace period required.
1818 */ 1818 */
1819static int rcu_gp_init(struct rcu_state *rsp) 1819static bool rcu_gp_init(struct rcu_state *rsp)
1820{ 1820{
1821 unsigned long oldmask; 1821 unsigned long oldmask;
1822 struct rcu_data *rdp; 1822 struct rcu_data *rdp;
@@ -1827,7 +1827,7 @@ static int rcu_gp_init(struct rcu_state *rsp)
1827 if (!READ_ONCE(rsp->gp_flags)) { 1827 if (!READ_ONCE(rsp->gp_flags)) {
1828 /* Spurious wakeup, tell caller to go back to sleep. */ 1828 /* Spurious wakeup, tell caller to go back to sleep. */
1829 raw_spin_unlock_irq(&rnp->lock); 1829 raw_spin_unlock_irq(&rnp->lock);
1830 return 0; 1830 return false;
1831 } 1831 }
1832 WRITE_ONCE(rsp->gp_flags, 0); /* Clear all flags: New grace period. */ 1832 WRITE_ONCE(rsp->gp_flags, 0); /* Clear all flags: New grace period. */
1833 1833
@@ -1837,7 +1837,7 @@ static int rcu_gp_init(struct rcu_state *rsp)
1837 * Not supposed to be able to happen. 1837 * Not supposed to be able to happen.
1838 */ 1838 */
1839 raw_spin_unlock_irq(&rnp->lock); 1839 raw_spin_unlock_irq(&rnp->lock);
1840 return 0; 1840 return false;
1841 } 1841 }
1842 1842
1843 /* Advance to a new grace period and initialize state. */ 1843 /* Advance to a new grace period and initialize state. */
@@ -1929,7 +1929,7 @@ static int rcu_gp_init(struct rcu_state *rsp)
1929 WRITE_ONCE(rsp->gp_activity, jiffies); 1929 WRITE_ONCE(rsp->gp_activity, jiffies);
1930 } 1930 }
1931 1931
1932 return 1; 1932 return true;
1933} 1933}
1934 1934
1935/* 1935/*