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: <dd78b859-5f1b-499c-9578-03b8a18418cc@acm.org>
Date: Mon, 15 Sep 2025 14:20:09 -0700
From: Bart Van Assche <bvanassche@....org>
To: Wang Jianzheng <wangjianzheng@...o.com>, Jens Axboe <axboe@...nel.dk>,
 Alim Akhtar <alim.akhtar@...sung.com>, Avri Altman <avri.altman@....com>,
 "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
 "Martin K. Petersen" <martin.petersen@...cle.com>,
 "Rafael J. Wysocki" <rafael@...nel.org>, Peter Wang
 <peter.wang@...iatek.com>, Bean Huo <beanhuo@...ron.com>,
 "Bao D. Nguyen" <quic_nguyenb@...cinc.com>,
 Adrian Hunter <adrian.hunter@...el.com>, linux-block@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
 linux-pm@...r.kernel.org
Subject: Re: [PATCH 3/3] scsi: ufs: core: Add support for frequency PM QoS
 tuning

On 9/14/25 4:45 AM, Wang Jianzheng wrote:
> +	if (!shost)
> +		return;

Please remove the above if-statement and make sure that the
initialization order guarantees that hba->host is set before
ufshcd_pm_qos_freq_read_value() can be called.

> +	shost_for_each_device(sdev, shost) {

Why a loop over all logical units? Isn't it sufficient to check the
WLUN?

> +		if (!sdev)
> +			continue;
> +
> +		q = sdev->request_queue;
> +		if (IS_ERR_OR_NULL(q))
> +			continue;
> +
> +		if (q->disk && !IS_ERR_OR_NULL(q->dev)) {

The above three if-statements are not necessary. Please remove these
three if-statements to improve code clarity.

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ