From patchwork Thu Jun 9 07:12:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 12874907 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 10C9CC433EF for ; Thu, 9 Jun 2022 07:14:15 +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=HS+Asxo+xovzrAjn63bmStNqIDqovhu4co2pd6WE+Sw=; b=Y02iGt9TIRy0ph rH+ZlFnS91/oS+69LjJFNjfcUsbrmfw8IU2aMIyE7CX2wryPIUQE+cZ1IaXs8e8NRPwBAHmzTbfC0 bZL+UFbC6vN8GNgOq9WaaunYJxN9pFl2NzfKFCTm2ik7jvC4KayLsb3nnuBp3luzkNNuzox4ufSJ5 kLavlKsgJp8ePgM1K0vp8Iry0iOHduJxrNUwaih2+hYkNhS1hWthajwsc3VHK/v4Fofc43zRBojpm e6ZKA/nErEemt9PRVNXz3MtHLHOWyKN3QRXgNXfM/yu39hfWvKcCOnf/XVj1Jkpu+y+OvppUtPIpu UOUN5jn/BEshPKPNUtyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzCLl-00HIUy-Sg; Thu, 09 Jun 2022 07:13:02 +0000 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzCLh-00HIT2-Oi for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2022 07:12:59 +0000 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0VFrcIPJ_1654758771; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VFrcIPJ_1654758771) by smtp.aliyun-inc.com; Thu, 09 Jun 2022 15:12:52 +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 Subject: [PATCH -next v2] spi: Return true/false (not 1/0) from bool function Date: Thu, 9 Jun 2022 15:12:50 +0800 Message-Id: <20220609071250.59509-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-20220609_001258_010556_D5E1743D X-CRM114-Status: UNSURE ( 9.13 ) 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. 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 --- 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; } }