lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201110175617.GD3429138@xps15>
Date:   Tue, 10 Nov 2020 10:56:17 -0700
From:   Mathieu Poirier <mathieu.poirier@...aro.org>
To:     xiakaixu1987@...il.com
Cc:     suzuki.poulose@....com, mike.leach@...aro.org,
        coresight@...ts.linaro.org, linux-kernel@...r.kernel.org,
        Kaixu Xia <kaixuxia@...cent.com>
Subject: Re: [PATCH v2] coresight: tmc-etr: Assign boolean values to a bool
 variable

On Tue, Nov 10, 2020 at 11:39:15AM +0800, xiakaixu1987@...il.com wrote:
> From: Kaixu Xia <kaixuxia@...cent.com>
> 
> Fix the following coccinelle warnings:
> 
> ./drivers/hwtracing/coresight/coresight-tmc-etr.c:957:2-15: WARNING: Assignment of 0/1 to bool variable
> 
> Fix them by assigning boolean values.
> 
> Reported-by: Tosk Robot <tencent_os_robot@...cent.com>
> Signed-off-by: Kaixu Xia <kaixuxia@...cent.com>
> ---
>  drivers/hwtracing/coresight/coresight-tmc-etr.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

I have applied your patch.

Thanks,
Mathieu

> 
> diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c
> index 714f9e867e5f..525f0ecc129c 100644
> --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c
> +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c
> @@ -954,11 +954,11 @@ static void tmc_sync_etr_buf(struct tmc_drvdata *drvdata)
>  		dev_dbg(&drvdata->csdev->dev,
>  			"tmc memory error detected, truncating buffer\n");
>  		etr_buf->len = 0;
> -		etr_buf->full = 0;
> +		etr_buf->full = false;
>  		return;
>  	}
>  
> -	etr_buf->full = status & TMC_STS_FULL;
> +	etr_buf->full = !!(status & TMC_STS_FULL);
>  
>  	WARN_ON(!etr_buf->ops || !etr_buf->ops->sync);
>  
> -- 
> 2.20.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ