linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: mpt3sas: style: Simplify bool comparison
@ 2021-01-11  8:54 YANG LI
  2021-01-23  2:55 ` Martin K. Petersen
  2021-01-27  4:54 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: YANG LI @ 2021-01-11  8:54 UTC (permalink / raw)
  To: jejb
  Cc: martin.petersen, sathya.prakash, sreekanth.reddy,
	suganath-prabu.subramani, MPT-FusionLinux.pdl, linux-scsi,
	linux-kernel, YANG LI

Fix the following coccicheck warning:
./drivers/scsi/mpt3sas/mpt3sas_base.c:2424:5-20: WARNING: Comparison of
0/1 to bool variable

Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com>
Reported-by: Abaci Robot<abaci@linux.alibaba.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 6e23dc3..f5582c8 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -2505,8 +2505,8 @@ static u32 base_mod64(u64 dividend, u32 divisor)
 	}
 
 	/* Check if we need to build a native SG list. */
-	if (base_is_prp_possible(ioc, pcie_device,
-				scmd, sges_left) == 0) {
+	if (!base_is_prp_possible(ioc, pcie_device,
+				scmd, sges_left)) {
 		/* We built a native SG list, just return. */
 		goto out;
 	}
-- 
1.8.3.1


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

* Re: [PATCH] scsi: mpt3sas: style: Simplify bool comparison
  2021-01-11  8:54 [PATCH] scsi: mpt3sas: style: Simplify bool comparison YANG LI
@ 2021-01-23  2:55 ` Martin K. Petersen
  2021-01-27  4:54 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-01-23  2:55 UTC (permalink / raw)
  To: YANG LI
  Cc: jejb, martin.petersen, sathya.prakash, sreekanth.reddy,
	suganath-prabu.subramani, MPT-FusionLinux.pdl, linux-scsi,
	linux-kernel


Yang,

> Fix the following coccicheck warning:
> ./drivers/scsi/mpt3sas/mpt3sas_base.c:2424:5-20: WARNING: Comparison of
> 0/1 to bool variable

Applied to 5.12/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] scsi: mpt3sas: style: Simplify bool comparison
  2021-01-11  8:54 [PATCH] scsi: mpt3sas: style: Simplify bool comparison YANG LI
  2021-01-23  2:55 ` Martin K. Petersen
@ 2021-01-27  4:54 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-01-27  4:54 UTC (permalink / raw)
  To: YANG LI, jejb
  Cc: Martin K . Petersen, linux-kernel, sathya.prakash,
	MPT-FusionLinux.pdl, sreekanth.reddy, linux-scsi,
	suganath-prabu.subramani

On Mon, 11 Jan 2021 16:54:13 +0800, YANG LI wrote:

> Fix the following coccicheck warning:
> ./drivers/scsi/mpt3sas/mpt3sas_base.c:2424:5-20: WARNING: Comparison of
> 0/1 to bool variable

Applied to 5.12/scsi-queue, thanks!

[1/1] scsi: mpt3sas: style: Simplify bool comparison
      https://git.kernel.org/mkp/scsi/c/bfb3f00c0613

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-01-27  5:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11  8:54 [PATCH] scsi: mpt3sas: style: Simplify bool comparison YANG LI
2021-01-23  2:55 ` Martin K. Petersen
2021-01-27  4:54 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).