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

Andrew Morton
2025-05-06T23:24:43Z

On Wed, 7 May 2025 00:02:38 +0800 WangYuli <wangyuli@uniontech.com> wrote:

> - for (i = tier % MAX_NR_TIERS; i <= min(tier, MAX_NR_TIERS - 1); i++) {
> + for (i = tier % MAX_NR_TIERS; i <= min(tier, (int)(MAX_NR_TIERS - 1)); i++) {

Make `tier' unsigned? After all, negative tier numbers are nonsensical.