RE: [PATCH v1] scsi: ufs: remove clk_scaling_lock when clkscaling isn't supported.

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

 



> > -	down_read(&hba->clk_scaling_lock);
> > +	if (ufshcd_is_clkscaling_supported(hba))
> > +		down_read(&hba->clk_scaling_lock);
> >
> >   	lrbp = &hba->lrb[tag];
> >   	WARN_ON(lrbp->cmd);
> 
> I don't like this patch at all. This patch makes testing the UFS driver
> more complicated without having any clear benefit. Additionally, adding
> if-statements in front of locking makes static source code analysis harder
> and is an anti-pattern. Please don't do this.
> 
> Bart. 

The benefit that I think is not blocking dev cmd during submitting a scsi cmd.
Rather, I don't understand why this lock is required if a SoC doesn't support clk scaling.

The period of ringing doorbells has been already protected by spin lock.

Thanks.
Kiwoong Kim





[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