Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5297647pxu; Tue, 22 Dec 2020 13:11:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjzzFR3v2vUBPfFySnpejBp8HLHgb470gXUs7d+tyB9My4NA76PEnKtXri8Ob8luAblC1Z X-Received: by 2002:a17:906:add7:: with SMTP id lb23mr22484106ejb.352.1608671517768; Tue, 22 Dec 2020 13:11:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608671517; cv=none; d=google.com; s=arc-20160816; b=a9Tn5wvc0sqtj7n9IofzQsRiePkvfWLOmTLtm8cvwcxNKgddx0iHLmvrfP4r3uYSIO NJ4dbaCzA53dj4wj+svSQ9za2E5WUO5xq+3rSkVffwp411Ll/O6057zQ42yBgZDmKa/1 OX4nk+powpbcGjOOZ9Ebvw164IAWvfkPgQYDEU2i6+mkP+3B4ZuaBQNSE0kgyNvLUOdb JbJ0f0bmf/bpp9lAD0JYH7DyATMBSjWy+QtXin7NUyRFmbn58lcURDIVEa/pVwL18a4z +2TdLceHZaRy3kNbulTmD7SMSfbp+gb25Hlc+rIKhNMpF4Gm50cTe0FGgTkjsB53lV7P aMKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:subject:cc:to :from:date; bh=rPfGBXYz+hAVEPG1tCC67zmx5vYfhxFiZ0KG/gM8fOA=; b=RH/StRGAmbusTjMBi+bTF8v9A7vfOmOab6XqZwvEe0Rp8y+9CRYbMeikcM1x4PYnyZ aEpAo6pnuADv9xYwniVWrKcK+M7l3SdXnlGpkxRRi8SdNd2d+5vS3uvrtuW/1Ym8G6Jb dT2K8GWyCSwCjq/lH060FC2jFnfD0MyCjBwi51NNl5vNYvO6Q8+KjYcdBDXq7vnuJA5h XsPgM1Bqslvl3ry6zS5ALB9RobEvfb2PAKHft9O/xP1GYo0tlhZDccpuKwcxVL6Vcm/V KNkqG/IA02uJKTzWnsXZnE6FYl7JkWPLF3CtXgMyX2zr6CbXdQdPzSqP0poIsVI60Qft Yr2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u22si11563005ejt.406.2020.12.22.13.11.34; Tue, 22 Dec 2020 13:11:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727994AbgLVVKC (ORCPT + 99 others); Tue, 22 Dec 2020 16:10:02 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:27192 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727954AbgLVVKB (ORCPT ); Tue, 22 Dec 2020 16:10:01 -0500 X-IronPort-AV: E=Sophos;i="5.78,440,1599516000"; d="scan'208";a="368372272" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Dec 2020 22:09:19 +0100 Date: Tue, 22 Dec 2020 22:09:18 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Dan Williams , Vishal Verma , Dave Jiang , Ira Weiny , "Rafael J. Wysocki" , Len Brown , linux-nvdimm@lists.01.org cc: linux-acpi@vger.kernel.org, Denis Efremov , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org Subject: [PATCH] ACPI: NFIT: 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: 7b36c1398fb6 ("coccinelle: misc: add flexible_array.cocci script") CC: Denis Efremov 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/torvalds/linux.git master head: 148842c98a24e508aecb929718818fbf4c2a6ff3 commit: 7b36c1398fb63f9c38cc83dc75f143d2e5995062 coccinelle: misc: add flexible_array.cocci script :::::: branch date: 20 hours ago :::::: commit date: 2 months ago core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -2268,7 +2268,7 @@ struct nfit_set_info { u64 region_offset; u32 serial_number; u32 pad; - } mapping[0]; + } mapping[]; }; struct nfit_set_info2 { @@ -2279,7 +2279,7 @@ struct nfit_set_info2 { u16 manufacturing_date; u8 manufacturing_location; u8 reserved[31]; - } mapping[0]; + } mapping[]; }; static size_t sizeof_nfit_set_info(int num_mappings)