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]
Date: Wed, 29 May 2024 13:12:39 -0700
From: Bart Van Assche <bvanassche@....org>
To: Avri Altman <avri.altman@....com>,
 "Martin K . Petersen" <martin.petersen@...cle.com>
Cc: Bean Huo <beanhuo@...ron.com>, Peter Wang <peter.wang@...iatek.com>,
 linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 2/3] scsi: ufs: Maximum RTT supported by the host
 driver

On 5/26/24 01:16, Avri Altman wrote:
> -	rtt = min_t(int, dev_info->rtt_cap, hba->nortt);
> +	if (hba->vops && hba->vops->max_num_rtt)
> +		rtt = hba->vops->max_num_rtt;
> +	else
> +		rtt = min_t(int, dev_info->rtt_cap, hba->nortt);
> +

Shouldn't what the controller supports be compared with what the device supports,
e.g. as follows?

min_t(int, dev_info->rtt_cap, hba->vops->max_num_rtt ? : hba->nortt);

>   struct ufs_hba_variant_ops {
>   	const char *name;
> +	int	max_num_rtt;

Hmm ... why 'int' instead of an unsigned type? If the type would be changed
into 'u8' (the type of rtt_cap) then the above min_t() can be changed into
min().

Thanks,

Bart.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ