From: Matthew Wilcox <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: WangYuli <wangyuli@uniontech.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
yuzhao@google.com, stevensd@chromium.org, kaleshsingh@google.com,
zhanjun@uniontech.com, niecheng1@uniontech.com,
guanwentao@uniontech.com
Subject: Re: [PATCH] mm: vmscan: Avoid signedness error for GCC 5.4
Date: Wed, 7 May 2025 21:49:50 +0100 [thread overview]
Message-ID: <aBvHbn-jrwhxFMkm@casper.infradead.org> (raw)
In-Reply-To: <20250507110701.c2c135d3f4ed594b914da41b@linux-foundation.org>
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.
next prev parent reply other threads:[~2025-05-07 20:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 16:02 WangYuli
2025-05-06 16:22 ` Matthew Wilcox
2025-05-07 2:55 ` WangYuli
2025-05-07 20:46 ` David Laight
2025-05-07 12:06 ` David Laight
2025-05-06 23:24 ` Andrew Morton
2025-05-07 4:06 ` WangYuli
2025-05-07 18:07 ` Andrew Morton
2025-05-07 20:49 ` Matthew Wilcox [this message]
2025-05-10 10:24 ` David Laight
2025-05-15 15:11 ` WangYuli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aBvHbn-jrwhxFMkm@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=guanwentao@uniontech.com \
--cc=kaleshsingh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=niecheng1@uniontech.com \
--cc=stevensd@chromium.org \
--cc=wangyuli@uniontech.com \
--cc=yuzhao@google.com \
--cc=zhanjun@uniontech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox