diff mbox series

scsi: csiostor: Assign boolean values to a bool variable

Message ID 1615282668-36935-1-git-send-email-jiapeng.chong@linux.alibaba.com (mailing list archive)
State New, archived
Headers show
Series scsi: csiostor: Assign boolean values to a bool variable | expand

Commit Message

Jiapeng Chong March 9, 2021, 9:37 a.m. UTC
Fix the following coccicheck warnings:

./drivers/scsi/csiostor/csio_scsi.c:150:9-10: WARNING: return of 0/1 in
function 'csio_scsi_itnexus_loss_error' with return type bool.

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

Comments

Martin K. Petersen March 19, 2021, 3:46 a.m. UTC | #1
On Tue, 9 Mar 2021 17:37:48 +0800, Jiapeng Chong wrote:

> Fix the following coccicheck warnings:
> 
> ./drivers/scsi/csiostor/csio_scsi.c:150:9-10: WARNING: return of 0/1 in
> function 'csio_scsi_itnexus_loss_error' with return type bool.

Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: csiostor: Assign boolean values to a bool variable
      https://git.kernel.org/mkp/scsi/c/2ed0fc2b9a79
diff mbox series

Patch

diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
index 55e74da..56b9ad0 100644
--- a/drivers/scsi/csiostor/csio_scsi.c
+++ b/drivers/scsi/csiostor/csio_scsi.c
@@ -147,9 +147,9 @@  static int csio_do_abrt_cls(struct csio_hw *,
 	case FW_ERR_RDEV_LOST:
 	case FW_ERR_RDEV_LOGO:
 	case FW_ERR_RDEV_IMPL_LOGO:
-		return 1;
+		return true;
 	}
-	return 0;
+	return false;
 }
 
 /*