[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aBo3W5HNMxLdtV2p@casper.infradead.org>
Date: Tue, 6 May 2025 17:22:51 +0100
From: Matthew Wilcox <willy@...radead.org>
To: WangYuli <wangyuli@...ontech.com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, yuzhao@...gle.com,
stevensd@...omium.org, kaleshsingh@...gle.com,
zhanjun@...ontech.com, niecheng1@...ontech.com,
guanwentao@...ontech.com
Subject: Re: [PATCH] mm: vmscan: Avoid signedness error for GCC 5.4
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?
Powered by blists - more mailing lists