From patchwork Fri Dec 3 09:44:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12654563 X-Patchwork-Delegate: kuba@kernel.org 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 7DA55C433F5 for ; Fri, 3 Dec 2021 09:44:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379619AbhLCJsJ (ORCPT ); Fri, 3 Dec 2021 04:48:09 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:54614 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379612AbhLCJsJ (ORCPT ); Fri, 3 Dec 2021 04:48:09 -0500 IronPort-Data: A9a23:ewDhkK6Yx6AvaCeURWuN7AxRtH3GchMFZxGqfqrLsXjdYENSgzdUzmZKWWuOPP+CNjajeI0kbNiyp0MAsMODmoM1GQY5pCpnJ55ogZqcVI7Bdi8cHAvLc5adFBo/hykmh2ipwPkcFhcwnT/wdOi+xZVA/fvQHOOlUraeYnsZqTJME0/NtzoywobVvaY42bBVMyvV0T/Di5W31G2Ng1aYAUpIg063ky6Didyp0N8uUvPSUtgQ1LPWvyF94JvyvshdJVOgKmVfNrbSq+ouUNiEEm3lExcFUrtJk577e0EQQ7PUVeSMoioLHfbyxEEY/2prjf1T2Pk0MC+7jx2LgtRwwZNJvIO5TQMBP6vWme1bXQMw/yRWbfQdoeKcexBTtuTWlSUqaUDE3fB/EEcnPqUd8/xpDGVKs/cfLVglbRqehua6hbu/TsFoh98/N4+zZcUYoH4I5TXYC+s2BJXGa6bU7NRbmjAqiahmBvvEZ8sILzBobRfHSxhGIEkaDJZ4l+Ct7lHjeD1fslSEpIIy6nLNwQh1lrPqNbL9ecGATO1Wk1yeq2aA+H72ajkcOcCTxCSt7H2hnKnMkDn9VYZUE6e3ntZugVuO1ikQBQcQWF+Tv/a0kAi9VshZJkhS/TAhxZXeXmTDosLVBkLj5ife51hCC5wATqsg5R/L0aTOpQCUGgA5ovd6QIROnKcLqfYCjDdlR+/UOAE= IronPort-HdrOrdr: A9a23:SAs6O6ifFRbQn3FR4TTqWRlBx3BQX4x13DAbv31ZSRFFG/Fws/re7cjzsiWEwQr5OUtQ0exoXZPwJU80mqQFm7X5V43OYODZghriEGgP1/qU/9SCIVyBygc+79YcT0EkMqyFMbESt6+Ti2XWYrRQpajhgcbY/JanvgxQoBlRGsJdBmFCe3Cm+2JNNUN77PECZemhD6R81kadkDgsH7uG7rhsZZmwm/T70LbvYRsDDxliwBCWljW25LO/OwXw5GZvb9vBqY1ShFQt/jaS2oyT986W8SL9/Uf3q7Ru3OP8wsBKA9GNjcRQChiEsGiVTbUkZJG4gRAeiMTqyG9vqvPlhDANEq1Iik/5TyWLjSDR+yPJ9XIP0jvZ0FedxUHop9f0LQhbN/Z8 X-IronPort-AV: E=Sophos;i="5.87,283,1631570400"; d="scan'208";a="8131532" 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/DHE-RSA-AES256-GCM-SHA384; 03 Dec 2021 10:44:44 +0100 Date: Fri, 3 Dec 2021 10:44:43 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Volodymyr Mytnyk cc: kbuild-all@lists.01.org, Linux Memory Management List , Serhiy Boiko , Taras Chornyi , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: prestera: 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: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org 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: 6e36c7bcb461 ("net: prestera: add counter HW API") CC: Volodymyr Mytnyk Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 9606f9efb1cec7f8f5912326f182fbfbcad34382 commit: 6e36c7bcb4611414b339173cdc33fdcb55c08f9e [4129/4921] net: prestera: add counter HW API :::::: branch date: 19 hours ago :::::: commit date: 3 days ago Please take the patch only if it's a positive warning. Thanks! prestera_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/marvell/prestera/prestera_hw.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_hw.c @@ -443,7 +443,7 @@ struct prestera_msg_counter_resp { __le32 offset; __le32 num_counters; __le32 done; - struct prestera_msg_counter_stats stats[0]; + struct prestera_msg_counter_stats stats[]; }; struct prestera_msg_span_req {