From patchwork Mon Jan 11 09:54:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abaci Team X-Patchwork-Id: 360791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67766C433DB for ; Mon, 11 Jan 2021 09:55:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1414822AAD for ; Mon, 11 Jan 2021 09:55:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725897AbhAKJzl (ORCPT ); Mon, 11 Jan 2021 04:55:41 -0500 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:33284 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbhAKJzl (ORCPT ); Mon, 11 Jan 2021 04:55:41 -0500 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R211e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e04420; MF=abaci-bugfix@linux.alibaba.com; NM=1; PH=DS; RN=6; SR=0; TI=SMTPD_---0ULL6orQ_1610358890; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:abaci-bugfix@linux.alibaba.com fp:SMTPD_---0ULL6orQ_1610358890) by smtp.aliyun-inc.com(127.0.0.1); Mon, 11 Jan 2021 17:54:55 +0800 From: YANG LI To: kdasu.kdev@gmail.com Cc: bcm-kernel-feedback-list@broadcom.com, broonie@kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, YANG LI Subject: [PATCH] spi: spi-bcm-qspi: style: Simplify bool comparison Date: Mon, 11 Jan 2021 17:54:48 +0800 Message-Id: <1610358888-88876-1-git-send-email-abaci-bugfix@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Fix the following coccicheck warning: ./drivers/spi/spi-bcm-qspi.c:884:5-34: WARNING: Comparison to bool Signed-off-by: YANG LI Reported-by: Abaci Robot --- drivers/spi/spi-bcm-qspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c index c028446..d28d7bd 100644 --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -881,7 +881,7 @@ static int bcm_qspi_bspi_exec_mem_op(struct spi_device *spi, * when using flex mode we need to send * the upper address byte to bspi */ - if (bcm_qspi_bspi_ver_three(qspi) == false) { + if (!bcm_qspi_bspi_ver_three(qspi)) { addr = from & 0xff000000; bcm_qspi_write(qspi, BSPI, BSPI_BSPI_FLASH_UPPER_ADDR_BYTE, addr); @@ -892,7 +892,7 @@ static int bcm_qspi_bspi_exec_mem_op(struct spi_device *spi, else addr = from & 0x00ffffff; - if (bcm_qspi_bspi_ver_three(qspi) == true) + if (bcm_qspi_bspi_ver_three(qspi)) addr = (addr + 0xc00000) & 0xffffff; /*