[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7b22b4b5-ddf9-42e3-9603-4f2422c31333@acm.org>
Date: Tue, 9 Apr 2024 10:21:58 -0700
From: Bart Van Assche <bvanassche@....org>
To: SEO HOYOUNG <hy50.seo@...sung.com>, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, alim.akhtar@...sung.com, avri.altman@....com,
jejb@...ux.ibm.com, martin.petersen@...cle.com, beanhuo@...ron.com,
kwangwon.min@...sung.com, kwmad.kim@...sung.com, sh425.lee@...sung.com,
quic_nguyenb@...cinc.com, cpgs@...sung.com, h10.kim@...sung.com
Subject: Re: [PATCH v2] scsi: ufs: core: changing the status to check inflight
On 4/8/24 23:32, SEO HOYOUNG wrote:
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 21429eec1b82..c940f52d9003 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -3082,16 +3082,7 @@ static int ufshcd_compose_dev_cmd(struct ufs_hba *hba,
> */
> bool ufshcd_cmd_inflight(struct scsi_cmnd *cmd)
> {
> - struct request *rq;
> -
> - if (!cmd)
> - return false;
> -
> - rq = scsi_cmd_to_rq(cmd);
> - if (!blk_mq_request_started(rq))
> - return false;
> -
> - return true;
> + return cmd && (blk_mq_rq_state(scsi_cmd_to_rq(cmd)) == MQ_RQ_IN_FLIGHT);
> }
There are superfluous parentheses in the above return statement. It is
unusual in Linux kernel code to surround equality tests with
parentheses.
Anyway:
Reviewed-by: Bart Van Assche <bvanassche@....org>
Powered by blists - more mailing lists