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 3b838ec127aa ("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.14/lru-v3 head: 58423b0ba935bb76ff3f6754703e8fb8533ecae3 commit: 3b838ec127aaaa0b5121fbffb2eaee9f2d014a7e [9/18] mm: multigenerational lru: mm_struct list
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
vmscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mm/vmscan.c +2 -2
@@ -2935,7 +2935,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;
@@ -3091,7 +3091,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 )