Content-Type: multipart/mixed; boundary="===============7362067008804071270==" MIME-Version: 1.0 From: Julia Lawall To: kbuild-all@lists.01.org Subject: [PATCH] mm: multigenerational lru: fix flexible_array.cocci warnings Date: Tue, 29 Jun 2021 13:56:25 +0200 Message-ID: List-Id: --===============7362067008804071270== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot 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 Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall --- tree: https://github.com/zen-kernel/zen-kernel 5.13/lru head: 6c0599d8df2c91043cffba0fbdd8c0fdc3297551 commit: 0c09e5f119fe208b6abf362197df921a81c18eea [9/14] mm: multigeneration= al 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(-) --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -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) --===============7362067008804071270==--