lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <feff073b-452f-48d3-b5a8-c308c59baec8@quicinc.com>
Date: Thu, 6 Feb 2025 15:53:02 +0800
From: Ziqi Chen <quic_ziqichen@...cinc.com>
To: Bart Van Assche <bvanassche@....org>, <quic_cang@...cinc.com>,
        <mani@...nel.org>, <beanhuo@...ron.com>, <avri.altman@....com>,
        <junwoo80.lee@...sung.com>, <martin.petersen@...cle.com>,
        <quic_nguyenb@...cinc.com>, <quic_nitirawa@...cinc.com>,
        <quic_rampraka@...cinc.com>
CC: <linux-arm-msm@...r.kernel.org>, <linux-scsi@...r.kernel.org>,
        Alim Akhtar
	<alim.akhtar@...sung.com>,
        "James E.J. Bottomley"
	<James.Bottomley@...senPartnership.com>,
        Peter Wang
	<peter.wang@...iatek.com>,
        Manivannan Sadhasivam
	<manivannan.sadhasivam@...aro.org>,
        Andrew Halaney <ahalaney@...hat.com>,
        Eric Biggers <ebiggers@...gle.com>, Minwoo Im <minwoo.im@...sung.com>,
        "open
 list" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 7/8] scsi: ufs: core: Toggle Write Booster during clock
 scaling base on gear speed



On 2/6/2025 2:09 AM, Bart Van Assche wrote:
> On 2/3/25 12:11 AM, Ziqi Chen wrote:
>> -    /* Enable Write Booster if we have scaled up else disable it */
>> -    if (ufshcd_enable_wb_if_scaling_up(hba) && !err)
>> -        ufshcd_wb_toggle(hba, scale_up);
>> +    /* Enable Write Booster if current gear requires it else disable 
>> it */
>> +    if (ufshcd_enable_wb_if_scaling_up(hba) && !err) {
>> +        bool wb_en = false;
>> +
>> +        wb_en = hba->pwr_info.gear_rx >= hba->clk_scaling.wb_gear ? 
>> true : false;
>> +        ufshcd_wb_toggle(hba, wb_en);
>> +    }
> 
> Both the " = false" initialization and the "? true : false" part are
> unnecessary. Please remove the "wb_en" variable entirely, e.g. as follows:
> 
>      if (ufshcd_enable_wb_if_scaling_up(hba) && !err)
>          ufshcd_wb_toggle(hba, hba->pwr_info.gear_rx >=
>                   hba->clk_scaling.wb_gear);
> 
> Otherwise this patch looks good to me.
> 
> Thanks,
> 
> Bart.

Sure , Bart. Your suggestion looks nice. let me apply it in next 
version, thank you~

-Ziqi


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ