From: Kaixu Xia Date: Fri, 27 Nov 2020 17:52:52 +0000 (-0700) Subject: coresight: tmc-etr: Assign boolean values to a bool variable X-Git-Tag: accepted/tizen/unified/20230118.172025~8316^2~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92815c0041ffd16799b408ff9fce9bae697e2bf8;p=platform%2Fkernel%2Flinux-rpi.git coresight: tmc-etr: Assign boolean values to a bool variable 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 Signed-off-by: Kaixu Xia Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201127175256.1092685-12-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 714f9e8..525f0ec 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);