diff mbox series

scsi: mvumi: Use true and false for bool variable

Message ID 1613643371-122635-1-git-send-email-jiapeng.chong@linux.alibaba.com (mailing list archive)
State Accepted
Headers show
Series scsi: mvumi: Use true and false for bool variable | expand

Commit Message

Jiapeng Chong Feb. 18, 2021, 10:16 a.m. UTC
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(-)

Comments

Martin K. Petersen March 19, 2021, 3:46 a.m. UTC | #1
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
diff mbox series

Patch

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)