From: Bart Van Assche <bvanassche@acm.org>
To: Ivan Shapovalov <intelfx@intelfx.name>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
David Rientjes <rientjes@google.com>,
David Hildenbrand <david@redhat.com>,
Vlastimil Babka <vbabka@suse.cz>,
Joel Granados <joel.granados@kernel.org>,
Sourav Panda <souravpanda@google.com>,
Kaiyang Zhao <kaiyang2@cs.cmu.edu>,
Johannes Weiner <hannes@cmpxchg.org>,
Konstantin Khlebnikov <koct9i@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] mm/vmstat: Fix a W=1 clang compiler warning
Date: Wed, 22 Jan 2025 13:55:31 -0800 [thread overview]
Message-ID: <2b2dfbf2-7d17-4576-b0fe-2e13d563cf47@acm.org> (raw)
In-Reply-To: <20250122015818.3308696-1-intelfx@intelfx.name>
On 1/21/25 5:57 PM, Ivan Shapovalov wrote:
>> Spose so. One always suspects that adding a typecast is a sign that we
>> screwed things up somehow. The relationship between enums lru_list and
>> node_stat_item is foggy, and I'm unsure whether this is the place to
>> make the transition it. Perhaps lru_list_name() should take an
>> `unsigned int' arg instead.
>
> All of these *_name() functions do seem to expect arguments in range of
> the corresponding enums, so perhaps keep those args typed as a form of
> self-documenting code, and do this instead?
>
> [ ... ]
Please take a look at
https://lore.kernel.org/linux-mm/8640d744-d182-474b-9059-204bcea47d1a@acm.org/.
I think the patch I posted on December 13
requires fewer changes and no type casts.
Thanks,
Bart.
next prev parent reply other threads:[~2025-01-22 21:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 21:31 Bart Van Assche
2024-12-13 2:24 ` Andrew Morton
2024-12-13 22:01 ` Bart Van Assche
2025-01-22 1:57 ` Ivan Shapovalov
2025-01-22 21:55 ` Bart Van Assche [this message]
2025-01-28 21:36 ` Bart Van Assche
2025-01-29 10:22 ` Vlastimil Babka
2025-01-29 17:30 ` Bart Van Assche
2025-01-29 22:46 ` David Laight
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=2b2dfbf2-7d17-4576-b0fe-2e13d563cf47@acm.org \
--to=bvanassche@acm.org \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=intelfx@intelfx.name \
--cc=joel.granados@kernel.org \
--cc=justinstitt@google.com \
--cc=kaiyang2@cs.cmu.edu \
--cc=koct9i@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=pasha.tatashin@soleen.com \
--cc=rientjes@google.com \
--cc=souravpanda@google.com \
--cc=vbabka@suse.cz \
/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