]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/vmstat: utilize designated initializers for the vmstat_text array
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Tue, 3 Jun 2025 08:45:56 +0000 (11:45 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 20 Jul 2025 01:59:46 +0000 (18:59 -0700)
commited6a9068a0fc01c27f49f97a84b3b80b0fda2787
tree6748b63f54c334afc4fd929570643bc4f1e53ad2
parent8a63ff68e5ead16ab384dcbed6103f9ad371e246
mm/vmstat: utilize designated initializers for the vmstat_text array

The vmstat_text array defines labels for counters displayed in
/proc/vmstat.  The current definition of the array implies a specific
order of the counters in their enums, making it fragile.

To make it clear which counter the label is for, use designated
initializers.

Link: https://lkml.kernel.org/r/20250603084556.113975-1-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmstat.c