From patchwork Thu Jun 9 06:03:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 581594 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9643FC433EF for ; Thu, 9 Jun 2022 06:03:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238834AbiFIGDl (ORCPT ); Thu, 9 Jun 2022 02:03:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238830AbiFIGDa (ORCPT ); Thu, 9 Jun 2022 02:03:30 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC7AF1EEF7; Wed, 8 Jun 2022 23:03:27 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R101e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018046060; MF=yang.lee@linux.alibaba.com; NM=1; PH=DS; RN=10; SR=0; TI=SMTPD_---0VFrGHUV_1654754604; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VFrGHUV_1654754604) by smtp.aliyun-inc.com; Thu, 09 Jun 2022 14:03:24 +0800 From: Yang Li To: krzysztof.kozlowski@linaro.org Cc: andi@etezian.org, broonie@kernel.org, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] spi: Return true/false (not 1/0) from bool function Date: Thu, 9 Jun 2022 14:03:23 +0800 Message-Id: <20220609060323.106095-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Return boolean values ("true" or "false") instead of 1 or 0 from bool function. This fixes the following warnings from coccicheck: ./drivers/spi/spi-s3c64xx.c:385:9-10: WARNING: return of 0/1 in function 's3c64xx_spi_can_dma' with return type bool Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/spi/spi-s3c64xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 82558e37c735..28e7b7cb68a7 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; } }