public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Lu Hongfei <luhongfei@vivo.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"open list:SCSI TARGET SUBSYSTEM" <linux-scsi@vger.kernel.org>,
	"open list:SCSI TARGET SUBSYSTEM" <target-devel@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Cc: "opensource.kernel@vivo.com" <opensource.kernel@vivo.com>
Subject: Re: [PATCH] drivers: target: Fix the conversion to bool in iblock_execute_pr_out
Date: Mon, 12 Jun 2023 10:04:28 +0000	[thread overview]
Message-ID: <53382bf3-69eb-b297-70ea-22571b877a2f@nvidia.com> (raw)
In-Reply-To: <20230612081006.40821-1-luhongfei@vivo.com>

On 6/12/23 01:10, Lu Hongfei wrote:
> The return value of the '==' or '!=' operator are bool, so there's
> no need to convert it to bool again in iblock_execute_pr_out.
>
> Signed-off-by: Lu Hongfei <luhongfei@vivo.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 254c33c9788e..ea42cb5d06d4
> --- 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) {

this not a fix as current code is not broken ..

-ck



  reply	other threads:[~2023-06-12 10:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-12  8:10 [PATCH] drivers: target: Fix the conversion to bool in iblock_execute_pr_out Lu Hongfei
2023-06-12 10:04 ` Chaitanya Kulkarni [this message]
2023-06-13  4:01   ` Konstantin Shelekhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53382bf3-69eb-b297-70ea-22571b877a2f@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=luhongfei@vivo.com \
    --cc=martin.petersen@oracle.com \
    --cc=opensource.kernel@vivo.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox