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: 12642501 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A20FC433F5 for ; Sat, 27 Nov 2021 18:03:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C7AFD6B0072; Sat, 27 Nov 2021 13:03:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C291C6B0078; Sat, 27 Nov 2021 13:03:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF1B76B007B; Sat, 27 Nov 2021 13:03:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0096.hostedemail.com [216.40.44.96]) by kanga.kvack.org (Postfix) with ESMTP id 9F1106B0072 for ; Sat, 27 Nov 2021 13:03:33 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 626008B75A for ; Sat, 27 Nov 2021 18:03:23 +0000 (UTC) X-FDA: 78855482286.26.7FF95CD Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by imf14.hostedemail.com (Postfix) with ESMTP id 6CE4C60019B5 for ; Sat, 27 Nov 2021 18:03:21 +0000 (UTC) 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 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 6CE4C60019B5 X-Stat-Signature: qmj743o3gczarprtm1bbpfk4z3niqcpq Authentication-Results: imf14.hostedemail.com; dkim=none; spf=pass (imf14.hostedemail.com: domain of julia.lawall@inria.fr designates 192.134.164.83 as permitted sender) smtp.mailfrom=julia.lawall@inria.fr; dmarc=none X-HE-Tag: 1638036201-12033 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 {