[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230524051148.96937-1-yang.lee@linux.alibaba.com>
Date: Wed, 24 May 2023 13:11:48 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: martin.petersen@...cle.com
Cc: linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
linux-kernel@...r.kernel.org, Yang Li <yang.lee@...ux.alibaba.com>,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH -next] scsi: target: Simplify bool conversion
./drivers/target/target_core_iblock.c:892:30-35: WARNING: conversion to bool not needed here
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5300
Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
---
drivers/target/target_core_iblock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index e6029ea87e2f..7a27de807902 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -889,7 +889,7 @@ static sense_reason_t iblock_execute_pr_out(struct se_cmd *cmd, u8 sa, u64 key,
ret = ops->pr_preempt(bdev, key, sa_key,
scsi_pr_type_to_block(type),
- sa == PRO_PREEMPT ? false : true);
+ sa != PRO_PREEMPT);
break;
case PRO_RELEASE:
if (!ops->pr_clear) {
--
2.20.1.7.g153144c
Powered by blists - more mailing lists