RE: [PATCH 2/4] scsi: ufs: Re-use exec_dev_cmd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux