[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<DM6PR04MB65756C6716317F7E1E47FF50FC222@DM6PR04MB6575.namprd04.prod.outlook.com>
Date: Tue, 5 Mar 2024 19:54:06 +0000
From: Avri Altman <Avri.Altman@....com>
To: Bart Van Assche <bvanassche@....org>, "James E . J . Bottomley"
<jejb@...ux.vnet.ibm.com>, "Martin K . Petersen" <martin.petersen@...cle.com>
CC: Bean Huo <beanhuo@...ron.com>, "linux-scsi@...r.kernel.org"
<linux-scsi@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/4] scsi: ufs: Re-use exec_dev_cmd
> 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.
Done.
>
> > @@ -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.
This is a redundant assignment - being set to null in ufshcd_compose_dev_cmd.
Thanks,
Avri
>
> Thanks,
>
> Bart.
Powered by blists - more mailing lists