public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] rcu: use true/false instead of 1/0 for a bool type
@ 2014-07-09  4:08 Pranith Kumar
  2014-07-09 16:42 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Pranith Kumar @ 2014-07-09  4:08 UTC (permalink / raw)
  To: Paul E. McKenney, Josh Triplett, open list:READ-COPY UPDATE...

One more bool type change which I found while reading the code.

Use true/false instead of 0/1 for a bool type

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 kernel/rcu/tree.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 1b70cb6..bc7b6f1 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1668,7 +1668,7 @@ static int rcu_gp_fqs(struct rcu_state *rsp, int fqs_state_in)
 	if (fqs_state == RCU_SAVE_DYNTICK) {
 		/* Collect dyntick-idle snapshots. */
 		if (is_sysidle_rcu_state(rsp)) {
-			isidle = 1;
+			isidle = true;
 			maxj = jiffies - ULONG_MAX / 4;
 		}
 		force_qs_rnp(rsp, dyntick_save_progress_counter,
@@ -1677,7 +1677,7 @@ static int rcu_gp_fqs(struct rcu_state *rsp, int fqs_state_in)
 		fqs_state = RCU_FORCE_QS;
 	} else {
 		/* Handle dyntick-idle and offline CPUs. */
-		isidle = 0;
+		isidle = false;
 		force_qs_rnp(rsp, rcu_implicit_dynticks_qs, &isidle, &maxj);
 	}
 	/* Clear flag to prevent immediate re-entry. */
@@ -2449,7 +2449,7 @@ static void force_qs_rnp(struct rcu_state *rsp,
 		for (; cpu <= rnp->grphi; cpu++, bit <<= 1) {
 			if ((rnp->qsmask & bit) != 0) {
 				if ((rnp->qsmaskinit & bit) != 0)
-					*isidle = 0;
+					*isidle = false;
 				if (f(per_cpu_ptr(rsp->rda, cpu), isidle, maxj))
 					mask |= bit;
 			}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] rcu: use true/false instead of 1/0 for a bool type
  2014-07-09  4:08 [PATCH 1/1] rcu: use true/false instead of 1/0 for a bool type Pranith Kumar
@ 2014-07-09 16:42 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2014-07-09 16:42 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: Josh Triplett, open list:READ-COPY UPDATE...

On Wed, Jul 09, 2014 at 12:08:17AM -0400, Pranith Kumar wrote:
> One more bool type change which I found while reading the code.
> 
> Use true/false instead of 0/1 for a bool type
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>

Queued for 3.18, thank you!

							Thanx, Paul

> ---
>  kernel/rcu/tree.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 1b70cb6..bc7b6f1 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -1668,7 +1668,7 @@ static int rcu_gp_fqs(struct rcu_state *rsp, int fqs_state_in)
>  	if (fqs_state == RCU_SAVE_DYNTICK) {
>  		/* Collect dyntick-idle snapshots. */
>  		if (is_sysidle_rcu_state(rsp)) {
> -			isidle = 1;
> +			isidle = true;
>  			maxj = jiffies - ULONG_MAX / 4;
>  		}
>  		force_qs_rnp(rsp, dyntick_save_progress_counter,
> @@ -1677,7 +1677,7 @@ static int rcu_gp_fqs(struct rcu_state *rsp, int fqs_state_in)
>  		fqs_state = RCU_FORCE_QS;
>  	} else {
>  		/* Handle dyntick-idle and offline CPUs. */
> -		isidle = 0;
> +		isidle = false;
>  		force_qs_rnp(rsp, rcu_implicit_dynticks_qs, &isidle, &maxj);
>  	}
>  	/* Clear flag to prevent immediate re-entry. */
> @@ -2449,7 +2449,7 @@ static void force_qs_rnp(struct rcu_state *rsp,
>  		for (; cpu <= rnp->grphi; cpu++, bit <<= 1) {
>  			if ((rnp->qsmask & bit) != 0) {
>  				if ((rnp->qsmaskinit & bit) != 0)
> -					*isidle = 0;
> +					*isidle = false;
>  				if (f(per_cpu_ptr(rsp->rda, cpu), isidle, maxj))
>  					mask |= bit;
>  			}
> -- 
> 1.9.1
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-09 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-09  4:08 [PATCH 1/1] rcu: use true/false instead of 1/0 for a bool type Pranith Kumar
2014-07-09 16:42 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox