scsi: target: Quiet bool conversion warning with pr_preempt use
Subsystems (2)
PATCH 1/1 scsi: target: Quiet bool conversion warning with pr_preempt use
We want to pass in true for pr_preempt's argument if we are doing a PRO_PREEMPT_AND_ABORT, so just test sa against PRO_PREEMPT_AND_ABORT, and pass the result directly to pr_preempt.
Reported-by kernel test robot <[email protected]>
Signed-off-by Mike Christie <[email protected]>
--- drivers/target/target_core_iblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/target/target_core_iblock.c +1 -1
@@ -888,7 +888,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_AND_ABORT );break ;case PRO_RELEASE :if (!ops->pr_clear) {
Signature · 1 line
2.25.1
pá 23. 6. 2023 v 18:13 odesílatel Mike Christie
<[email protected]> napsal:
Quoted 26 lines
We want to pass in true for pr_preempt's argument if we are doing a
PRO_PREEMPT_AND_ABORT, so just test sa againstPRO_PREEMPT_AND_ABORT, and pass the result directly topr_preempt.Reported-by kernel test robot <[email protected]>Signed-off-by Mike Christie <[email protected]>--- drivers/target/target_core_iblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/target/target_core_iblock.c +1
-2@@ -888,7 +888,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_AND_ABORT );break ;case PRO_RELEASE :if (!ops->pr_clear) { --
Quoted 2 lines
2.25.1
Reviewed-by Maurizio Lombardi <[email protected]>
Martin K. Petersen
AppliedMike,
Quoted 3 lines
We want to pass in true for pr_preempt's argument if we are doing a
PRO_PREEMPT_AND_ABORT, so just test sa againstPRO_PREEMPT_AND_ABORT, and pass the result directly topr_preempt.
Applied to 6.5/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering