public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: xiakaixu1987@gmail.com
Cc: suzuki.poulose@arm.com, mike.leach@linaro.org,
	coresight@lists.linaro.org, linux-kernel@vger.kernel.org,
	Kaixu Xia <kaixuxia@tencent.com>
Subject: Re: [PATCH v2] coresight: tmc-etr: Assign boolean values to a bool variable
Date: Tue, 10 Nov 2020 10:56:17 -0700	[thread overview]
Message-ID: <20201110175617.GD3429138@xps15> (raw)
In-Reply-To: <1604979555-20619-1-git-send-email-kaixuxia@tencent.com>

On Tue, Nov 10, 2020 at 11:39:15AM +0800, xiakaixu1987@gmail.com wrote:
> From: Kaixu Xia <kaixuxia@tencent.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@tencent.com>
> Signed-off-by: Kaixu Xia <kaixuxia@tencent.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
> 

      reply	other threads:[~2020-11-10 17:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10  3:39 [PATCH v2] coresight: tmc-etr: Assign boolean values to a bool variable xiakaixu1987
2020-11-10 17:56 ` Mathieu Poirier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201110175617.GD3429138@xps15 \
    --to=mathieu.poirier@linaro.org \
    --cc=coresight@lists.linaro.org \
    --cc=kaixuxia@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.leach@linaro.org \
    --cc=suzuki.poulose@arm.com \
    --cc=xiakaixu1987@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox