Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp813531ybk; Wed, 13 May 2020 13:53:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygresXJMyNJh6/rIpWpbVzUp+08bj3Iuh1KDUqD7xo4hCo8JEnN1LPSZxbuH24YUJ6v51X X-Received: by 2002:aa7:c453:: with SMTP id n19mr1369963edr.218.1589403224141; Wed, 13 May 2020 13:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589403224; cv=none; d=google.com; s=arc-20160816; b=AN8QBx7Ks66HPIYjCEQbRbuYewnQ3ZjGzePMuri19eLfTVzTQPGvluZKMzL938Z6fC EW030KWJoViBzl7djc6qwEl4CDro/tMJ9R76EunB8TTJoC4mA8ho7qJrHDIniTE744YY /N11GD79I5SnRVJepiyoC+wFZ+lzPBpb4sPdddpk8tRJzFlb7c/n/n4lUZtjOisaN3TY oxdzmbKM23Vx9zGKRPFEMLOwU4P0yVRGqT4BG+YTMMK8NgSJ/TeF17sbwYVVwlUvd9fq qL42tWAweHZ9zjRWRfhfWr0qSLh3+GjYD+t+pr1zTfqIJHG8ir7hdPKFe/f2sgiKj32T qVJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BhDM1AuORIInHd9jMnjYR3Wv2CcLBIVeHPn6dHZCsQw=; b=qdbhTQ/mBSnjkGKZTOz5IsmmsgwK470K3EqbEp5lbv2/ZtAYAhnZ6FU0v+Ed3OgSN9 b4Q2nB0xeTRgDTvnUtH048g3qiWTjJ8ksIInwEKO6lGuBdKnPH3u80aGGiR+BF49F6xN xblKwhXy+J3iFjJ6L5ACa2DBf4gzkeAkmsSHpyGTAj+8PNOdlhtQwHRVjsDEAmgpfg6h ea2GtHLImZoxtifaHG+4cEU8e/JyiFfKa2oxs3uB0RYIAhUUbNSOCNkmPhQic2tRxgKA xkU2kJ4alnOp7Q2WqSrZt2o2HZVJ1f+YsQ9Wnuzhm5wedC9zXKNonnrti2iCN3/5C8Iq K9bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EBccvFjg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si524577ejk.369.2020.05.13.13.53.22; Wed, 13 May 2020 13:53:44 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=EBccvFjg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390187AbgEMTHR (ORCPT + 99 others); Wed, 13 May 2020 15:07:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:38516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732218AbgEMTHR (ORCPT ); Wed, 13 May 2020 15:07:17 -0400 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 20DB12054F; Wed, 13 May 2020 19:07:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589396837; bh=6ic+6n1wGdR4/pvLTH/MP65+OfXLiPfd9XYBKnzj5LE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=EBccvFjgyFZKOaGw8K7zRaf94Y0GYjmBm3DVxnG/mr99sytI1GEXGGKNw4h1testq YAXlpbUlELnBw+zbEXKgNTYCv0DWPQ++h5wrBnqJCFQZKmFrf1MHkGFqn6URrD1VCb X8sLenn4g31EV+qEfTegBWcSzb8rseKCo48bNsoc= Received: by mail-lj1-f172.google.com with SMTP id g4so830654ljl.2; Wed, 13 May 2020 12:07:16 -0700 (PDT) X-Gm-Message-State: AOAM530Q2aiSgi1JMAXi6o0n/3IsLjfLZE3GLQigXM2lVMT2Ana1ItaB EocEJMtZ+cY7uZqvcBo+I07hPc7Y/MMRWL2TmXE= X-Received: by 2002:a05:651c:1025:: with SMTP id w5mr331990ljm.113.1589396834316; Wed, 13 May 2020 12:07:14 -0700 (PDT) MIME-Version: 1.0 References: <20200507192209.GA16290@embeddedor> In-Reply-To: <20200507192209.GA16290@embeddedor> From: Song Liu Date: Wed, 13 May 2020 12:07:03 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] md/raid1: Replace zero-length array with flexible-array To: "Gustavo A. R. Silva" Cc: linux-raid , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 7, 2020 at 12:17 PM Gustavo A. R. Silva wrote: > > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: > > struct foo { > int stuff; > struct boo array[]; > }; > [...] > > This issue was found with the help of Coccinelle. > > [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > [2] https://github.com/KSPP/linux/issues/21 > [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") > > Signed-off-by: Gustavo A. R. Silva Applied to md-next. Thanks!