SCSI target development
 help / color / mirror / Atom feed
* [PATCH -next] scsi: target: Simplify bool conversion
@ 2023-05-24  5:11 Yang Li
  0 siblings, 0 replies; only message in thread
From: Yang Li @ 2023-05-24  5:11 UTC (permalink / raw)
  To: martin.petersen
  Cc: linux-scsi, target-devel, linux-kernel, Yang Li, Abaci Robot

./drivers/target/target_core_iblock.c:892:30-35: WARNING: conversion to bool not needed here

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5300
Signed-off-by: Yang Li <yang.lee@linux.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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-24  5:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-24  5:11 [PATCH -next] scsi: target: Simplify bool conversion Yang Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox