All of lore.kernel.org
 help / color / mirror / Atom feed
From: YANG LI <abaci-bugfix@linux.alibaba.com>
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 <abaci-bugfix@linux.alibaba.com>
Subject: [PATCH] spi: spi-bcm-qspi: style: Simplify bool comparison
Date: Mon, 11 Jan 2021 17:54:48 +0800	[thread overview]
Message-ID: <1610358888-88876-1-git-send-email-abaci-bugfix@linux.alibaba.com> (raw)

Fix the following coccicheck warning:
./drivers/spi/spi-bcm-qspi.c:884:5-34:
WARNING: Comparison to bool

Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com>
Reported-by: Abaci Robot<abaci@linux.alibaba.com>
---
 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;
 
 	/*
-- 
1.8.3.1


             reply	other threads:[~2021-01-11  9:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11  9:54 YANG LI [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-11  9:26 [PATCH] spi: spi-bcm-qspi: style: Simplify bool comparison YANG LI
2021-01-11 16:29 ` Mark Brown
2021-01-11 16:41   ` Florian Fainelli
2021-01-11 17:05     ` Mark Brown
2021-01-11 17:21       ` Florian Fainelli
2021-01-11 17:29         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1610358888-88876-1-git-send-email-abaci-bugfix@linux.alibaba.com \
    --to=abaci-bugfix@linux.alibaba.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=broonie@kernel.org \
    --cc=kdasu.kdev@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.