(subset) [PATCH 00/44] Change a lot of min_t() that might mask high bits

Jens Axboe axboe at kernel.dk
Thu Nov 20 06:52:43 PST 2025


On Wed, 19 Nov 2025 22:40:56 +0000, david.laight.linux at gmail.com wrote:
> It in not uncommon for code to use min_t(uint, a, b) when one of a or b
> is 64bit and can have a value that is larger than 2^32;
> This is particularly prevelant with:
> 	uint_var = min_t(uint, uint_var, uint64_expression);
> 
> Casts to u8 and u16 are very likely to discard significant bits.
> 
> [...]

Applied, thanks!

[12/44] block: use min() instead of min_t()
        commit: 9420e720ad192c53c8d2803c5a2313b2d586adbd

Best regards,
-- 
Jens Axboe






More information about the Linux-nvme mailing list