On Sat, Dec 01, 2018 at 05:09:36PM +0800, Wen Yang wrote:
> Fix the following warnings reported by coccinelle:
> kernel//sched/fair.c:7958:3-12: WARNING: Assignment of bool to 0/1
> 
> This also makes the code more readable.
> 
> Signed-off-by: Wen Yang <wen.yan...@zte.com.cn>
> CC: Ingo Molnar <mi...@redhat.com>
> CC: Peter Zijlstra <pet...@infradead.org>
> CC: linux-kernel@vger.kernel.org

Ack, earlier assignments in the function like:

        if (nr_running > 1)
                *overload = true;

use `= true`, so this change keeps things consistent.

Reviewed-by: Joey Pabalinas <joeypabali...@gmail.com>

> ---
>  kernel/sched/fair.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index a2e8160968cb..f19aa66f9b15 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -7955,7 +7955,7 @@ static inline void update_sg_lb_stats(struct lb_env 
> *env,
>               if (env->sd->flags & SD_ASYM_CPUCAPACITY &&
>                   sgs->group_misfit_task_load < rq->misfit_task_load) {
>                       sgs->group_misfit_task_load = rq->misfit_task_load;
> -                     *overload = 1;
> +                     *overload = true;
>               }
>       }
>  
> -- 
> 2.19.1
> 

-- 
Cheers,
Joey Pabalinas

Attachment: signature.asc
Description: PGP signature

Reply via email to