Re: [PATCH next resend 1/5] minmax: Add min_unsigned(a, b) and max_unsigned(a, b)

From: Matthew Wilcox
Date: Tue Jul 25 2023 - 08:38:50 EST


On Tue, Jul 25, 2023 at 11:48:14AM +0000, David Laight wrote:
> +#define min_unsigned(x, y) \
> + __careful_cmp((x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull, <)

What is the point of "+ 0u + 0ul + 0ull"? How is that any different
from "+ 0ull"? And why force the compiler to do a 64-bit comparison
when it could do a 32-bit comparison?