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: 12874843 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 367E0C433EF for ; Thu, 9 Jun 2022 06:05:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=IePWNlWkn1EYIwxQ5C7XzF/ZiArAiGNCLVY4y6HwaJg=; b=btUq4CATaY+Hs2 YfHU6p0VhY/whV806lxoBQzlt4VBMFEO0xW4P87i/UD4gBjXrvPRPWJb1rEoZZOpYRm2bk3HgdpKq NhfdCIFydUyt+rgLKVInckBge2LaINneXibPTRg0Np+fT6VWStNb5ClC/WZOSYejciCCbfwhelIAI ugX9ZJ2j+ZT4w6DceVEIV03upH6Fe98GwY5aL39OCjuVnQJLqZps15O/TpX02jq7J3ujG2FQMFqkl c5OILSFbYtGmhGncPikU1oemnLYB7eqAleQbUTtUsDLoVVFxlE2/16eeFcs+qTFwAjByi8zNGlNuA /MUl/lgaBM+fZcbCucVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzBHY-00GyLj-M6; Thu, 09 Jun 2022 06:04:37 +0000 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzBGR-00Gxf1-Se for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2022 06:03:29 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220608_230328_134097_5365C5C5 X-CRM114-Status: UNSURE ( 9.41 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Reviewed-by: Krzysztof Kozlowski --- 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; } }