All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] mm: multigenerational lru: fix flexible_array.cocci warnings
Date: Tue, 29 Jun 2021 19:53:31 +0800	[thread overview]
Message-ID: <20210629115331.GA14803@fcadbdeef42b> (raw)
In-Reply-To: <202106291915.I3w71RTu-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1800 bytes --]

CC: kbuild-all(a)lists.01.org
TO: steven(a)liquorix.net

From: kernel test robot <lkp@intel.com>

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)
mm/vmscan.c:3067: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: 0c09e5f119fe ("mm: multigenerational lru: mm_struct list")
CC: Yu Zhao <yuzhao@google.com>
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.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(-)

--- 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)

  reply	other threads:[~2021-06-29 11:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-10-25  7:16 [zen:5.14/lru-v5 6/14] mm/vmscan.c:2946:3-8: " kernel test robot
2021-10-25  7:16 ` [PATCH] mm: multigenerational lru: fix flexible_array.cocci warnings kernel test robot
2021-10-11  6:09 [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-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-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=20210629115331.GA14803@fcadbdeef42b \
    --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.