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 B163AA0555; Fri, 3 Jun 2022 09:19:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5AC5D40691; Fri, 3 Jun 2022 09:19:59 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id CB1714021E for ; Fri, 3 Jun 2022 09:19:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654240797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G1yle+fOL275aWusyRdShyLQqhYFb30bY7n66ievnMc=; b=GO9CoFai1NqE3qMVK6tJL+mplSMATS9sAoIaw2P8vaCZhBDLZy7N66tEb71zw8RCxj6IMH SNiaG+O3bOVxfK9+AJiGWKUNuQR6VsXJ2qyELo9HyS/rikC68H8cqInR1uTszOKI9fBVyW sqg6qFEtoMIyxM2zllBY9SLXz+i7df0= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-225-OqUXGWkSMP6gP3U6aoxijw-1; Fri, 03 Jun 2022 03:19:48 -0400 X-MC-Unique: OqUXGWkSMP6gP3U6aoxijw-1 Received: by mail-lf1-f72.google.com with SMTP id g11-20020a05651222cb00b0047872568226so3740585lfu.3 for ; Fri, 03 Jun 2022 00:19:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=G1yle+fOL275aWusyRdShyLQqhYFb30bY7n66ievnMc=; b=K5agD4X/B5zbTBpbhlwh2jafJ/eF2X0GqOmtk2kmlkRpL5ej88N3yEauBY/Hsz21b0 AvU61lcNZKqXznYU/CVEsQVmgkVBixVk8fsbzklTTqrFiV39JHV95gM7M7s2foAAz4Jl fV5FOQCJJ6g3AGBwxjzmjC5u4wDbJM0KhcSO03AgfaHoEjtC18XdDz/bGTkCh0isreRD XgxYHFp2QUaIVkhwtsMnPDKIrH6u4D4sjU0km9OJyX0FMJiDGJM67iNLTudCzAoa1UUy IACnhdcyTFTTVf63ootB3mwistXneddLtMyNc9efYtJ2cXZ8E7+Dzsnf9e/YdCCiTLF7 QUAg== X-Gm-Message-State: AOAM531A4stRZOyhkG1BGZZwcpZoKX7aYUTIhFMQDPQm4CyFopQGANCD ++qeOi8usjSCv65/cbw0eAvIerodd+EE0HeNriSVSNns6XCF0NoPE7vdWddc9TO0k1i9aN+iqef 46G7a63gjaE7PHNE3In8= X-Received: by 2002:a05:651c:1781:b0:247:daa7:4358 with SMTP id bn1-20020a05651c178100b00247daa74358mr43317364ljb.477.1654240787256; Fri, 03 Jun 2022 00:19:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaWh1v4q7tmAU4vN8dzgHlJmHFVmGFyrYjqOVlsPA5BZJocP1Ce8mR+yGqVfm4me/s28zI9NGgOQgF9h7jKpE= X-Received: by 2002:a05:651c:1781:b0:247:daa7:4358 with SMTP id bn1-20020a05651c178100b00247daa74358mr43317360ljb.477.1654240787008; Fri, 03 Jun 2022 00:19:47 -0700 (PDT) MIME-Version: 1.0 References: <20220602150834.643745-1-bruce.richardson@intel.com> <20220602161324.1123926-1-bruce.richardson@intel.com> <20220602161324.1123926-3-bruce.richardson@intel.com> In-Reply-To: <20220602161324.1123926-3-bruce.richardson@intel.com> From: David Marchand Date: Fri, 3 Jun 2022 09:19:35 +0200 Message-ID: Subject: Re: [PATCH v2 2/4] drivers: replace zero-length arrays with undimensioned ones To: Bruce Richardson Cc: dev , =?UTF-8?Q?Morten_Br=C3=B8rup?= , Stephen Hemminger Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 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]. -- David Marchand