Re: [PATCH v2] locktorture: Fix assignment of boolean variables

From: Ingo Molnar
Date: Mon Dec 03 2018 - 03:00:46 EST



* Wen Yang <wen.yang99@xxxxxxxxxx> wrote:

> Fix the following warnings reported by coccinelle:
>
> kernel/locking/locktorture.c:703:6-10: WARNING: Assignment of bool to 0/1
> kernel/locking/locktorture.c:918:2-20: WARNING: Assignment of bool to 0/1
> kernel/locking/locktorture.c:949:3-20: WARNING: Assignment of bool to 0/1
> kernel/locking/locktorture.c:682:2-19: WARNING: Assignment of bool to 0/1
> kernel/locking/locktorture.c:688:2-19: WARNING: Assignment of bool to 0/1
> kernel/locking/locktorture.c:648:2-20: WARNING: Assignment of bool to 0/1
> kernel/locking/locktorture.c:654:2-20: WARNING: Assignment of bool to 0/1
>
> This patch also makes the code more readable.

No, it doesn't make the code more readable!

0/1 patterns are blatantly obvious and shorter to both write and read
than false/true text.

NAK.

Thanks,

Ingo