From patchwork Sat Jan 22 11:09:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12720706 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C7A9C433EF for ; Sat, 22 Jan 2022 11:09:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234062AbiAVLJq (ORCPT ); Sat, 22 Jan 2022 06:09:46 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:8888 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233972AbiAVLJq (ORCPT ); Sat, 22 Jan 2022 06:09:46 -0500 X-IronPort-AV: E=Sophos;i="5.88,308,1635199200"; d="scan'208";a="17377281" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2022 12:09:45 +0100 Date: Sat, 22 Jan 2022 12:09:44 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: bpf@vger.kernel.org cc: Kumar Kartikeya Dwivedi , kbuild-all@lists.01.org Subject: [PATCH bpf-next] bpf: fix flexible_array.cocci warnings Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net 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: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests") Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall CC: Kumar Kartikeya Dwivedi --- url: https://github.com/0day-ci/linux/commits/Kumar-Kartikeya-Dwivedi/Introduce-unstable-CT-lookup-helpers/20220115-004219 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master :::::: branch date: 8 days ago :::::: commit date: 8 days ago test_run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -293,7 +293,7 @@ struct prog_test_fail2 { struct prog_test_fail3 { int len; char arr1[2]; - char arr2[0]; + char arr2[]; }; noinline void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb)