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: <e0a30d55-5319-48e7-a121-04db8a393f39@acm.org>
Date: Wed, 5 Feb 2025 10:09:16 -0800
From: Bart Van Assche <bvanassche@....org>
To: Ziqi Chen <quic_ziqichen@...cinc.com>, 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/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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ