Re: [PATCH] mm: vmscan: Avoid signedness error for GCC 5.4

Matthew Wilcox
2025-05-06T16:23:40Z

On Wed, May 07, 2025 at 12:02:38AM +0800, WangYuli wrote:
> To the compiler, (MAX_NR_TIERS - 1) (i.e., (4U - 1)) is unsigned,
> whereas tier is a signed integer.
>
> GCC 5.4 does not permit the minimum operation on such
> type-inconsistent operands.

1. This has nothing to do with the compiler version; the type-checking
is built into min().
2. We have min_t for a reason
3. Why is a signed min the right answer instead of an unsigned min?