Re: [PATCH 4.14 06/24] android: binder: Use true and false for boolean values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 21, 2020 at 01:39:59PM +0100, Lee Jones wrote:
> From: "Gustavo A. R. Silva" <gustavo@xxxxxxxxxxxxxx>
> 
> [ Upstream commit 197410ad884eb18b31d48e9d8e64cb5a9e326f2f ]
> 
> Assign true or false to boolean variables instead of an integer value.
> 
> This issue was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>
> Cc: Todd Kjos <tkjos@xxxxxxxxxxx>
> Cc: Martijn Coenen <maco@xxxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
> ---
>  drivers/android/binder.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index 05e75d18b4d93..afb690ed31ed9 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -249,7 +249,7 @@ static struct binder_transaction_log_entry *binder_transaction_log_add(
>  	unsigned int cur = atomic_inc_return(&log->cur);
>  
>  	if (cur >= ARRAY_SIZE(log->entry))
> -		log->full = 1;
> +		log->full = true;

While nice and pretty, this does not actually fix a bug, so it's not
needed for stable trees.

thanks,

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux