Re: [PATCH]sched: completion: use bool in try_wait_for_completion

2018-02-21 Thread gaurav jindal
On Wed, Feb 21, 2018 at 02:28:54PM +0100, Peter Zijlstra wrote: > On Wed, Feb 21, 2018 at 06:24:07PM +0530, gaurav jindal wrote: > > Variable ret in try_wait_for_completion can have only true/false values. > > Since > > the return type of the function is also bool, variable ret should have data >

Re: [PATCH]sched: completion: use bool in try_wait_for_completion

2018-02-21 Thread Peter Zijlstra
On Wed, Feb 21, 2018 at 06:24:07PM +0530, gaurav jindal wrote: > Variable ret in try_wait_for_completion can have only true/false values. Since > the return type of the function is also bool, variable ret should have data > type as bool in place of int. Fair enough. > Moreover, the size of bool i

[PATCH]sched: completion: use bool in try_wait_for_completion

2018-02-21 Thread gaurav jindal
Variable ret in try_wait_for_completion can have only true/false values. Since the return type of the function is also bool, variable ret should have data type as bool in place of int. Moreover, the size of bool in many platforms is 1 byte whereas size of int is 4 bytes(though architecture dependen

Re: [PATCH]sched: completion: use bool in try_wait_for_completion

2018-02-19 Thread Peter Zijlstra
On Wed, Feb 14, 2018 at 04:00:02PM +0530, gaurav jindal wrote: > Use bool in place of int in the function try_wait_for_completion. I can see that from the patch; what you failed to describe is why you've bothered to do the patch. Which doesn't apply because of whitespace damage; please re-read th

[PATCH]sched: completion: use bool in try_wait_for_completion

2018-02-14 Thread gaurav jindal
Use bool in place of int in the function try_wait_for_completion. Signed-off-by: Gaurav Jindal --- diff --git a/kernel/sched/completion.c b/kernel/sched/completion.c index 0926aef..3e15e8d 100644 --- a/kernel/sched/completion.c +++ b/kernel/sched/completion.c @@ -283,7 +283,7 @@ int __sched wait

[PATCH]sched: completion: use bool in try_wait_for_completion

2018-01-24 Thread gaurav jindal
Use bool in place of int in the function try_wait_for_completion. Signed-off-by: Gaurav Jindal --- diff --git a/kernel/sched/completion.c b/kernel/sched/completion.c index 0926aef..3e15e8d 100644 --- a/kernel/sched/completion.c +++ b/kernel/sched/completion.c @@ -283,7 +283,7 @@ int __sched wait