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 F0B99C433EF for ; Fri, 3 Dec 2021 09:44:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379637AbhLCJsK (ORCPT ); Fri, 3 Dec 2021 04:48:10 -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: =?us-ascii?q?A9a23=3AewDhkK6Yx6AvaCeURWuN7AxRtH3GchMFZxGqfqr?= =?us-ascii?q?LsXjdYENSgzdUzmZKWWuOPP+CNjajeI0kbNiyp0MAsMODmoM1GQY5pCpnJ55og?= =?us-ascii?q?ZqcVI7Bdi8cHAvLc5adFBo/hykmh2ipwPkcFhcwnT/wdOi+xZVA/fvQHOOlUra?= =?us-ascii?q?eYnsZqTJME0/NtzoywobVvaY42bBVMyvV0T/Di5W31G2Ng1aYAUpIg063ky6Di?= =?us-ascii?q?dyp0N8uUvPSUtgQ1LPWvyF94JvyvshdJVOgKmVfNrbSq+ouUNiEEm3lExcFUrt?= =?us-ascii?q?Jk577e0EQQ7PUVeSMoioLHfbyxEEY/2prjf1T2Pk0MC+7jx2LgtRwwZNJvIO5T?= =?us-ascii?q?QMBP6vWme1bXQMw/yRWbfQdoeKcexBTtuTWlSUqaUDE3fB/EEcnPqUd8/xpDGV?= =?us-ascii?q?Ks/cfLVglbRqehua6hbu/TsFoh98/N4+zZcUYoH4I5TXYC+s2BJXGa6bU7NRbm?= =?us-ascii?q?jAqiahmBvvEZ8sILzBobRfHSxhGIEkaDJZ4l+Ct7lHjeD1fslSEpIIy6nLNwQh?= =?us-ascii?q?1lrPqNbL9ecGATO1Wk1yeq2aA+H72ajkcOcCTxCSt7H2hnKnMkDn9VYZUE6e3n?= =?us-ascii?q?tZugVuO1ikQBQcQWF+Tv/a0kAi9VshZJkhS/TAhxZXeXmTDosLVBkLj5ife51h?= =?us-ascii?q?CC5wATqsg5R/L0aTOpQCUGgA5ovd6QIROnKcLqfYCjDdlR+/UOAE=3D?= IronPort-HdrOrdr: =?us-ascii?q?A9a23=3ASAs6O6ifFRbQn3FR4TTqWRlBx3BQX4x13DAb?= =?us-ascii?q?v31ZSRFFG/Fws/re7cjzsiWEwQr5OUtQ0exoXZPwJU80mqQFm7X5V43OYODZgh?= =?us-ascii?q?riEGgP1/qU/9SCIVyBygc+79YcT0EkMqyFMbESt6+Ti2XWYrRQpajhgcbY/Jan?= =?us-ascii?q?vgxQoBlRGsJdBmFCe3Cm+2JNNUN77PECZemhD6R81kadkDgsH7uG7rhsZZmwm/?= =?us-ascii?q?T70LbvYRsDDxliwBCWljW25LO/OwXw5GZvb9vBqY1ShFQt/jaS2oyT986W8SL9?= =?us-ascii?q?/Uf3q7Ru3OP8wsBKA9GNjcRQChiEsGiVTbUkZJG4gRAeiMTqyG9vqvPlhDANEq?= =?us-ascii?q?1Iik/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 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.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 {