Re: [PATCH] mm/vmstat: Fix a W=1 clang compiler warning
From: Ivan Shapovalov
Date: Tue Jan 21 2025 - 20:58:47 EST
> 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?
---