From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3972340265474980805==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] coccinelle: misc: fix flexible_array.cocci warnings Date: Sun, 04 Jul 2021 13:33:18 +0800 Message-ID: <20210704053318.GA21071@6c1ded655b71> In-Reply-To: <202107041317.yWIDZgcy-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============3972340265474980805== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org CC: linux-kernel(a)vger.kernel.org TO: Denis Efremov CC: Julia Lawall CC: Alexey Kuznetsov CC: Hideaki YOSHIFUJI CC: Jakub Kicinski CC: netdev(a)vger.kernel.org CC: linux-kernel(a)vger.kernel.org From: kernel test robot net/ipv6/rpl_iptunnel.c:16:24-27: WARNING use flexible-array member instead= (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-lengt= h-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: 7b36c1398fb6 ("coccinelle: misc: add flexible_array.cocci script") CC: Denis Efremov Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = master head: 303392fd5c160822bf778270b28ec5ea50cab2b4 commit: 7b36c1398fb63f9c38cc83dc75f143d2e5995062 coccinelle: misc: add flex= ible_array.cocci script :::::: branch date: 11 hours ago :::::: commit date: 9 months ago Please take the patch only if it's a positive warning. Thanks! rpl_iptunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv6/rpl_iptunnel.c +++ b/net/ipv6/rpl_iptunnel.c @@ -13,7 +13,7 @@ #include = struct rpl_iptunnel_encap { - struct ipv6_rpl_sr_hdr srh[0]; + struct ipv6_rpl_sr_hdr srh[]; }; = struct rpl_lwt { --===============3972340265474980805==--