RE: Re: [PATCH] scsi: ufs: remove redundant initialization of variable

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

 



Hi Bean,

> On Fri, 2021-04-30 at 11:14 +0900, Keoseong Park wrote:
>> The variable d_lu_wb_buf_alloc may be repeatedly initialized to 0 in
>> a for-loop.
>> 
>> If the variable is set to a value other than 0, it exits the for-
>> loop, so there is no need to reset it to 0.
>> 
>> 
>> 
>> Since lun and d_lu_wb_buf_alloc are just being used in a else
>> statement inside a local scope, move the declaration of the variables
>> to that scope.
>> 
>> 
>> 
>> Signed-off-by: Keoseong Park <keosung.park@xxxxxxxxxxx>
> 
>UFS Spec 3.1, bDeviceMaxWriteBoosterLUs is 01h, for LU dedicated buffer
>mode, WriteBooster Buffer can be configured in only one logical unit.
> 
>Bean
> 
> 

I don't think this patch has anything to do with "bDeviceMaxWriteBoosterLUs is 01h".
If the WB LUN is 7, this patch prevents d_lu_wb_buf_alloc from being redundantly initialized 8 times.

Thanks,
Keoseong



[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