From: Yang Li Date: Thu, 9 Jun 2022 07:12:50 +0000 (+0800) Subject: spi: Return true/false (not 1/0) from bool function X-Git-Tag: v6.6.17~6771^2~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0356163e5883e298b518cd16517be633824987f9;p=platform%2Fkernel%2Flinux-rpi.git spi: Return true/false (not 1/0) from bool function Return boolean values ("true" or "false") instead of 1 or 0 from bool function. As reported by coccicheck: ./drivers/spi/spi-s3c64xx.c:385:9-10: WARNING: return of 0/1 in function 's3c64xx_spi_can_dma' with return type bool Signed-off-by: Yang Li Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20220609071250.59509-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index f56d9c8..0ce5810 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -382,7 +382,7 @@ static bool s3c64xx_spi_can_dma(struct spi_master *master, if (sdd->rx_dma.ch && sdd->tx_dma.ch) { return xfer->len > (FIFO_LVL_MASK(sdd) >> 1) + 1; } else { - return 0; + return false; } }