From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3EE3FA0555; Fri, 3 Jun 2022 09:36:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0AFC40691; Fri, 3 Jun 2022 09:36:37 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 6B3544021E for ; Fri, 3 Jun 2022 09:36:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654241796; x=1685777796; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=BZ4CvtL33/79grr4kpeRkPDSwulO2+UUollQOhLO8/o=; b=lrO3+hO2EPDVwTgdwaC/Q+N+q0yx8MWZg3Yyw1bS3D4iPxtgz36xP8/o TQhiufPZsp/fGa1gr3ENxBndPPDvbG1Nzz46po/vmYh/lwxR19Esycqul hqDyQD7ymKcOhIpMUj1FB8PWE1tA76rphiEDKFcRcSNXfke2hsznbXdTz ks6qYEwUf3brWtb9ND1oBNk/bxd07tFWJ7xK73DKvhwZBTpYq63kSKrIe pahAEWiYsRFBfzLTbC/vIn+E9T+4a2/14fCKINXTorqczFnvivH1EGZUT G/06GApO3UORZZg01lvEjQ2eYxcs7u52f/qdze3E135xRRjcM8oiK6LHW g==; X-IronPort-AV: E=McAfee;i="6400,9594,10366"; a="362564642" X-IronPort-AV: E=Sophos;i="5.91,273,1647327600"; d="scan'208";a="362564642" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2022 00:36:35 -0700 X-IronPort-AV: E=Sophos;i="5.91,273,1647327600"; d="scan'208";a="577912694" Received: from adzukova-mobl.ger.corp.intel.com (HELO bricha3-MOBL.ger.corp.intel.com) ([10.252.6.223]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 03 Jun 2022 00:36:33 -0700 Date: Fri, 3 Jun 2022 08:36:30 +0100 From: Bruce Richardson To: David Marchand Cc: dev , Morten =?iso-8859-1?Q?Br=F8rup?= , Stephen Hemminger Subject: Re: [PATCH v2 2/4] drivers: replace zero-length arrays with undimensioned ones Message-ID: References: <20220602150834.643745-1-bruce.richardson@intel.com> <20220602161324.1123926-1-bruce.richardson@intel.com> <20220602161324.1123926-3-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Jun 03, 2022 at 09:19:35AM +0200, David Marchand wrote: > Hello Bruce, > > On Thu, Jun 2, 2022 at 6:14 PM Bruce Richardson > wrote: > > diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h > > index bc3e70a1d1..ed0781a560 100644 > > --- a/drivers/common/mlx5/mlx5_prm.h > > +++ b/drivers/common/mlx5/mlx5_prm.h > > @@ -560,7 +560,7 @@ struct mlx5_umr_wqe { > > struct mlx5_rdma_write_wqe { > > struct mlx5_wqe_cseg ctr; > > struct mlx5_wqe_rseg rseg; > > - struct mlx5_wqe_dseg dseg[0]; > > + struct mlx5_wqe_dseg dseg[]; > > } __rte_packed; > > > > #ifdef PEDANTIC > > @@ -3479,7 +3479,7 @@ struct mlx5_ifc_qpc_pas_list_bits { > > #endif > > struct mlx5_ifc_qpc_extension_and_pas_list_bits { > > struct mlx5_ifc_qpc_extension_bits qpc_data_extension; > > - u8 pas[0][0x40]; > > + u8[0x40] pas[]; > > Gcc and clang seem to agree they disagree with coccinelle. > clang suggests using u8 pas[][0x40]. > Will fix in v3. > > -- > David Marchand >