From: Bart Van Assche <bvanassche@acm.org>
To: Avri Altman <avri.altman@wdc.com>,
"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Bean Huo <beanhuo@micron.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] scsi: ufs: Re-use exec_dev_cmd
Date: Tue, 5 Mar 2024 11:09:58 -0800 [thread overview]
Message-ID: <4f766df0-b1df-4e5f-8acd-31710ed4399b@acm.org> (raw)
In-Reply-To: <20240304092346.654-3-avri.altman@wdc.com>
On 3/4/24 01:23, Avri Altman wrote:
> +static int __exec_dev_cmd(struct ufs_hba *hba, struct ufshcd_lrb *lrbp,
> + const u32 tag, int timeout)
Please choose a better name than __exec_dev_cmd. Function names in this
file should start with the ufshcd_ prefix.
> @@ -3300,28 +3318,15 @@ static void ufshcd_dev_man_unlock(struct ufs_hba *hba)
> static int ufshcd_exec_dev_cmd(struct ufs_hba *hba,
> enum dev_cmd_type cmd_type, int timeout)
> {
> - DECLARE_COMPLETION_ONSTACK(wait);
> const u32 tag = hba->reserved_slot;
> - struct ufshcd_lrb *lrbp;
> + struct ufshcd_lrb *lrbp = &hba->lrb[tag];
> int err;
>
> - lrbp = &hba->lrb[tag];
> - lrbp->cmd = NULL;
> err = ufshcd_compose_dev_cmd(hba, lrbp, cmd_type, tag);
Please restore the "lrbp->cmd = NULL" assignment. I don't think that it
is safe to remove that assignment.
Thanks,
Bart.
next prev parent reply other threads:[~2024-03-05 19:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 9:23 [PATCH 0/4] Re-use device management code fragments Avri Altman
2024-03-04 9:23 ` [PATCH 1/4] scsi: ufs: Re-use device management locking code Avri Altman
2024-03-05 19:04 ` Bart Van Assche
2024-03-05 19:51 ` Avri Altman
2024-03-04 9:23 ` [PATCH 2/4] scsi: ufs: Re-use exec_dev_cmd Avri Altman
2024-03-05 19:09 ` Bart Van Assche [this message]
2024-03-05 19:54 ` Avri Altman
2024-03-05 20:11 ` Bart Van Assche
2024-03-05 20:27 ` Avri Altman
2024-03-04 9:23 ` [PATCH 3/4] scsi: ufs: Re-use compose_dev_cmd Avri Altman
2024-03-05 19:13 ` Bart Van Assche
2024-03-04 9:23 ` [PATCH 4/4] scsi: ufs: Re-use compose_devman_upiu Avri Altman
2024-03-05 19:15 ` Bart Van Assche
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=4f766df0-b1df-4e5f-8acd-31710ed4399b@acm.org \
--to=bvanassche@acm.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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
all inboxes | Powered by JetHome®