Re: [PATCH v3 1/2] scsi: ufs: Use unsigned types for the BSG query

Bart Van Assche <[email protected]>
Newsgroups org.kernel.vger.linux-scsi,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 7/23/26 8:10 PM, Hyeoncheol Jeong wrote:
> +	*desc_len = min(*desc_len, (u16)QUERY_DESC_MAX_SIZE);

Please remove the u16 cast. Modern versions of min() can handle
arguments with different widths. See also commit d03eba99f5bf ("minmax:
allow min()/max()/clamp() if the arguments have the same signedness.").

Thanks,

Bart.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.