[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aBvHbn-jrwhxFMkm@casper.infradead.org>
Date: Wed, 7 May 2025 21:49:50 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: WangYuli <wangyuli@...ontech.com>, 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 11:07:01AM -0700, Andrew Morton wrote:
> `int' is a curse. Yes, we do this very frequently - we unthinkingly
> use a signed type for a naturally unsigned concept. Ths signed type
> spreads and spreads and the incorrect signage causes (small) problems
> in various places. By then it's a big mess trying to switch to an
> unsigned type.
>
> Oh well, we just battle on. We should at least be more vigilant about
> this when adding new things.
>
>
> hp2:/usr/src/25> grep "int nid" mm/*.c | wc -l
> 316
$ git grep def.*NUMA_NO_NODE include
include/linux/nodemask_types.h:#define NUMA_NO_NODE (-1)
I bet if you change all of those to unsigned, you'll get a
non-functional kernel. C is awful, we need to dump it.
Powered by blists - more mailing lists