All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: spi-bcm-qspi: style: Simplify bool comparison
@ 2021-01-11  9:26 YANG LI
  2021-01-11 16:29 ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: YANG LI @ 2021-01-11  9:26 UTC (permalink / raw)
  To: kdasu.kdev
  Cc: bcm-kernel-feedback-list, broonie, linux-spi, linux-kernel, YANG LI

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c
index c028446..707fe3a 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);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] spi: spi-bcm-qspi: style: Simplify bool comparison
@ 2021-01-11  9:54 YANG LI
  0 siblings, 0 replies; 7+ messages in thread
From: YANG LI @ 2021-01-11  9:54 UTC (permalink / raw)
  To: kdasu.kdev
  Cc: bcm-kernel-feedback-list, broonie, linux-spi, linux-kernel, YANG LI

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-11 17:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-01-11  9:54 YANG LI

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.