From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] mm: multigenerational lru: fix flexible_array.cocci warnings
Date: Mon, 25 Oct 2021 15:16:21 +0800 [thread overview]
Message-ID: <20211025071621.GA84656@be1feed6fc4a> (raw)
In-Reply-To: <202110251504.vatsg8wJ-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1801 bytes --]
CC: kbuild-all(a)lists.01.org
TO: steven(a)liquorix.net
From: kernel test robot <lkp@intel.com>
mm/vmscan.c:2946:3-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
mm/vmscan.c:3080:15-21: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
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: 3cf93f784702 ("mm: multigenerational lru: mm_struct list")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/zen-kernel/zen-kernel 5.14/lru-v5
head: 99e7c83f97caf5a659eadcd6d547d68ae648ab0d
commit: 3cf93f784702b891e31203fdc7e8f0017f5f0e87 [6/14] mm: multigenerational lru: mm_struct list
:::::: branch date: 2 weeks ago
:::::: commit date: 5 weeks 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
@@ -2943,7 +2943,7 @@ struct lru_gen_mm_list {
int nr_walkers;
/* stats for debugging */
unsigned long stats[NR_STAT_GENS][NR_MM_STATS];
- } nodes[0];
+ } nodes[];
};
static struct lru_gen_mm_list *global_mm_list;
@@ -3077,7 +3077,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 void reset_mm_stats(struct lru_gen_mm_list *mm_list, bool last,
next prev parent reply other threads:[~2021-10-25 7:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 7:16 [zen:5.14/lru-v5 6/14] mm/vmscan.c:2946:3-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) kernel test robot
2021-10-25 7:16 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-10-11 6:09 kernel test robot
2021-10-11 6:09 ` [PATCH] mm: multigenerational lru: fix flexible_array.cocci warnings kernel test robot
2021-09-07 20:34 Julia Lawall
2021-09-07 18:10 [zen-kernel-zen-kernel:5.14/lru-v3 9/18] mm/vmscan.c:2938:3-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) kernel test robot
2021-09-07 18:10 ` [PATCH] mm: multigenerational lru: fix flexible_array.cocci warnings kernel test robot
2021-06-29 11:56 Julia Lawall
2021-06-29 11:53 [zen-kernel-zen-kernel:5.13/lru 9/14] mm/vmscan.c:2911:3-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) kernel test robot
2021-06-29 11:53 ` [PATCH] mm: multigenerational lru: fix flexible_array.cocci warnings kernel test robot
2021-04-29 4:22 [zen-kernel-zen-kernel:5.12/lru 10/16] mm/vmscan.c:4506:3-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) kernel test robot
2021-04-29 4:22 ` [PATCH] mm: multigenerational lru: fix flexible_array.cocci warnings kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211025071621.GA84656@be1feed6fc4a \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.