mm: multigenerational lru: fix flexible_array.cocci warnings
Subsystems (3)
PATCH 1/1 mm: multigenerational lru: fix flexible_array.cocci warnings
From: kernel test robot <[email protected]>
Zero-length and one-element arrays are deprecated, see Documentation/process/deprecated.rst Flexible-array members should be used instead.
Generated by: scripts/coccinelle/misc/flexible_array.cocci
Fixes 0c09e5f119fe ("mm: multigenerational lru: mm_struct list")
CC Yu Zhao <[email protected]>
Reported-by kernel test robot <[email protected]>
Signed-off-by kernel test robot <[email protected]>
Signed-off-by Julia Lawall <[email protected]>
---
tree: https://github.com/zen-kernel/zen-kernel 5.13/lru head: 6c0599d8df2c91043cffba0fbdd8c0fdc3297551 commit: 0c09e5f119fe208b6abf362197df921a81c18eea [9/14] mm: multigenerational lru: mm_struct list
:::::: branch date: 14 hours ago
:::::: commit date: 14 hours ago
Please take the patch only if it's a positive warning. Thanks!
vmscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mm/vmscan.c +2 -2
@@ -2908,7 +2908,7 @@ struct lru_gen_mm_list {int nr_workers;/* stats for debugging */ unsigned long stats[NR_STAT_GENS ][NR_MM_STATS ]; - } nodes[0 ]; + } nodes[]; };static struct lru_gen_mm_list *global_mm_list;
@@ -3064,7 +3064,7 @@ struct mm_walk_args {int batch_size;int nr_pages[MAX_NR_GENS ][ANON_AND_FILE ][MAX_NR_ZONES ];int mm_stats[NR_MM_STATS ]; -unsigned long bitmap[0 ]; +unsigned long bitmap[]; };static int size_of_mm_walk_args (void )