From patchwork Tue Jan 25 07:05:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 12723343 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 B7DCCC433F5 for ; Tue, 25 Jan 2022 07:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237946AbiAYHLm (ORCPT ); Tue, 25 Jan 2022 02:11:42 -0500 Received: from mga12.intel.com ([192.55.52.136]:32031 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354655AbiAYHIp (ORCPT ); Tue, 25 Jan 2022 02:08:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643094525; x=1674630525; h=date:from:to:cc:subject:message-id:mime-version: in-reply-to; bh=TM+0Jr1Vw3weZTr6/c/RHKFMaebSsOXjgJtgqb35HWw=; b=DK/XbBW6zXaBg6Y1YuFM6xvERmPlY2d9buDZ9dA/dQvkxV2NpY/5r6vH bzg70CITiAdWS0u4iuS2aIv1TXFBcII8+4DdPOPAKRq73WSgLPfmb273G 2TQJY6Vb1/w8RPTWuiD4k6CQc7nJ216PUHHz5albARzNXpNsq0SnKXvky 9FLoUZlO5u/pAf5T55QBfMlQeKKWfLw3WqYes7/NJAnsGk3S46/EmaKKR zdP1GXjcZHT35zyN+lTcqEzfIOd77r4NzGvJtPQL2uYaMoNG8VFNlqr1v hgfot6lsuPNW7qg4DtxEkvPc6BdaZXfuQRV1uqJYB+6siAcCo+4MXYqoY g==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="226216544" X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="226216544" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2022 23:05:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="695727805" Received: from lkp-server01.sh.intel.com (HELO 276f1b88eecb) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 24 Jan 2022 23:05:27 -0800 Received: from kbuild by 276f1b88eecb with local (Exim 4.92) (envelope-from ) id 1nCFtO-000JTE-P0; Tue, 25 Jan 2022 07:05:26 +0000 Date: Tue, 25 Jan 2022 15:05:19 +0800 From: kernel test robot To: Kumar Kartikeya Dwivedi Cc: Julia Lawall , bpf@vger.kernel.org, kbuild-all@lists.01.org Subject: [PATCH bpf-next] bpf: fix flexible_array.cocci warnings Message-ID: <20220125070519.GA56817@inn2.lkp.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net From: kernel test robot net/bpf/test_run.c:296:6-10: 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: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests") CC: Kumar Kartikeya Dwivedi Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall 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)