All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: mvumi: Use true and false for bool variable
@ 2021-02-18 10:16 Jiapeng Chong
  2021-03-19  3:46 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-02-18 10:16 UTC (permalink / raw)
  To: jejb; +Cc: martin.petersen, linux-scsi, linux-kernel, Jiapeng Chong

Fix the following coccicheck warnings:

./drivers/scsi/mvumi.c:69:9-10: WARNING: return of 0/1 in function
'tag_is_empty' with return type bool.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/scsi/mvumi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index 71b6a1f..7cc1143 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -66,9 +66,9 @@ static void tag_release_one(struct mvumi_hba *mhba, struct mvumi_tag *st,
 static bool tag_is_empty(struct mvumi_tag *st)
 {
 	if (st->top == 0)
-		return 1;
+		return true;
 	else
-		return 0;
+		return false;
 }
 
 static void mvumi_unmap_pci_addr(struct pci_dev *dev, void **addr_array)
-- 
1.8.3.1


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

* Re: [PATCH] scsi: mvumi: Use true and false for bool variable
  2021-02-18 10:16 [PATCH] scsi: mvumi: Use true and false for bool variable Jiapeng Chong
@ 2021-03-19  3:46 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-03-19  3:46 UTC (permalink / raw)
  To: Jiapeng Chong, jejb; +Cc: Martin K . Petersen, linux-scsi, linux-kernel

On Thu, 18 Feb 2021 18:16:11 +0800, Jiapeng Chong wrote:

> Fix the following coccicheck warnings:
> 
> ./drivers/scsi/mvumi.c:69:9-10: WARNING: return of 0/1 in function
> 'tag_is_empty' with return type bool.

Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: mvumi: Use true and false for bool variable
      https://git.kernel.org/mkp/scsi/c/59f90f5e6c80

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-03-19  3:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 10:16 [PATCH] scsi: mvumi: Use true and false for bool variable Jiapeng Chong
2021-03-19  3:46 ` Martin K. Petersen

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.