RE: [PATCH v7 06/11] scsi: ufshpb: Region inactivation in host mode

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

 



> > >> On 2021-04-06 13:20, Avri Altman wrote:
> > >> >> > -static void __ufshpb_evict_region(struct ufshpb_lu *hpb,
> > >> >> > -                               struct ufshpb_region *rgn)
> > >> >> > +static int __ufshpb_evict_region(struct ufshpb_lu *hpb,
> > >> >> > +                              struct ufshpb_region *rgn)
> > >> >> >  {
> > >> >> >       struct victim_select_info *lru_info;
> > >> >> >       struct ufshpb_subregion *srgn;
> > >> >> >       int srgn_idx;
> > >> >> >
> > >> >> > +     lockdep_assert_held(&hpb->rgn_state_lock);
> > >> >> > +
> > >> >> > +     if (hpb->is_hcm) {
> > >> >> > +             unsigned long flags;
> > >> >> > +             int ret;
> > >> >> > +
> > >> >> > +             spin_unlock_irqrestore(&hpb->rgn_state_lock, flags);
> > >> >>
> > >> >> Never seen a usage like this... Here flags is used without being
> > >> >> intialized.
> > >> >> The flag is needed when spin_unlock_irqrestore ->
> > >> >> local_irq_restore(flags) to
> > >> >> restore the DAIF register (in terms of ARM).
> > >> > OK.
> > >>
> > >> Hi Avri,
> > >>
> > >> Checked on my setup, this lead to compilation error. Will you fix it
> > >> in
> > >> next version?
> > >>
> > >> warning: variable 'flags' is uninitialized when used here
> > >> [-Wuninitialized]
> > > Yeah - I will pass it to __ufshpb_evict_region and drop the
> > > lockdep_assert call.
Please ignore it.  This of course won't do.
Will fix it in v8.

Thanks,
Avri




[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