From patchwork Sat Nov 27 18:03:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12642503 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 C102FC433F5 for ; Sat, 27 Nov 2021 18:12:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343810AbhK0SPn (ORCPT ); Sat, 27 Nov 2021 13:15:43 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:39612 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355929AbhK0SNn (ORCPT ); Sat, 27 Nov 2021 13:13:43 -0500 IronPort-Data: A9a23:ASQ/Fq2uzpzk+kFHD/bD5fNwkn2cJEfYwER7XOPLsXnJgT0r1GNRxjAWWjqAOviKMWChfdwlat6+pB4EvZDdmtM2QQE+nZ1PZyIT+JCdXbx1DW+pYnjMdpWbJK5fAnR3huDodKjYdVeB4EfyWlTdhSMkj/jRH+CjULSs1h1ZHmeIdg9w0HqPpMZp2uaEsfDha++8kYuaT//3YDdJ6BYoWo4g0J9vnTs01BjEVJz0iXRlDRxDlAe2e3D4l/vzL4npR5fzatE88uJX24/+IL+FEmPxp3/BC/ulm7rhc0AMKlLQFVjTzCQGHfH4214b+XdaPqUTbZLwbW9VljGIlpZ1wcpEsZiYSAEzP6SKlv51vxxwTXwiY/IYpdcrJlD666R/1XbuY3rlxPFvBUc5e5wR/OlAWElI5eReIzcIBjiAjf+3xL7+Q+1orsAiN9XwettG/HZ6wlnxCfcgXICGRqDi5sFR1zR2gdpBdd7AY8MVaD9udlLHZwFCM1E/DoIm2uyvgxHXeDlRtV6UuOwy6m7UzQhZ1qj1dtHSf7SiTMFYjk+eqnjLuW70BhUdMt23wz2C7natgKnEmiaTcL80O5m58ON6rEeS2GEJIBgXXkG8qvm4kgi1XNc3A0US9jAjsoA26UqtCNL9NzWmoWCFsxhaV9tcHuk99CmCz6PV50CSAW1sZjAHZtUnssIyQT0C2VqAntevDjtq2JWWVHiU3rSZtzW/PW4SN2BqTSkJUQcI/fH9r4wpyBHCVNBuFOiylNKdJN1a61hmtwBn2O5V1JRSkfvruwCaxSihuN7SQBRz4AjLNl9JJzhRPOaND7FEI3CChRqYELukcw== IronPort-HdrOrdr: A9a23:RqWdJKrSCqTaboVCmzFHGMgaV5rYeYIsimQD101hICG9Ffbo6/xG/c5rqCMc7Qx7NU3I9urwQ5VoPkmsjKKdjbN8AV7AZnidhILXFvAb0WKK+VSJcUPDH4hmpMJdmsNFZ+EYY2IK7/rS0U2cE9EjxdmB/rrtrerS1Ht2Vw1nApsA0y5JTiOaFU9yRA5JH94YE5Wbj/A3xAaISDAzbsO4A3kDUfKGndHNmZ78CCRnO/ZngjP+6w9AH4SKd2n+4isj X-IronPort-AV: E=Sophos;i="5.87,269,1631570400"; d="scan'208";a="6546765" 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; 27 Nov 2021 19:03:20 +0100 Date: Sat, 27 Nov 2021 19:03:20 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Xiaoliang Yang cc: kbuild-all@lists.01.org, Linux Memory Management List , Vladimir Oltean , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Vivien Didelot , Florian Fainelli , Jakub Kicinski , netdev@vger.kernel.org Subject: [PATCH] net: dsa: felix: 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: 23ae3a787771 ("net: dsa: felix: add stream gate settings for psfp") CC: Xiaoliang Yang 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: f81e94e91878bded599cc60f2881cfd50991aeb9 commit: 23ae3a7877718931474684ef4fbbaf1d1511ee84 [2018/3632] net: dsa: felix: add stream gate settings for psfp :::::: branch date: 12 hours ago :::::: commit date: 7 days ago felix_vsc9959.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -1385,7 +1385,7 @@ struct felix_stream_gate { u64 cycletime; u64 cycletime_ext; u32 num_entries; - struct action_gate_entry entries[0]; + struct action_gate_entry entries[]; }; struct felix_stream_gate_entry {