From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 01A8AA0553; Mon, 17 Feb 2020 14:06:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5124A1D6E4; Mon, 17 Feb 2020 14:06:43 +0100 (CET) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id BB95E1D51E for ; Mon, 17 Feb 2020 14:06:41 +0100 (CET) Received: by mail-io1-f68.google.com with SMTP id x1so6900726iop.7 for ; Mon, 17 Feb 2020 05:06:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=PmNcEj0iVHsjcdS3ciW97nt9jd0kFelREIRE2D142p0=; b=HPOhxZTvDMgyXecJr03e8Il99QhNOaU5O55XBxIHxeOEFwN/OGWskocMj6IvVRZtBZ dvi5OoT705ZmzL6y2lY/EXx3pHQ5rkCBFx7t49ZMCTguSGMTY6QmBj0MRgPaf8vnIP27 kBo50F4DMhAQgZpB2C/3ko6ydyyMU36mwHWlv9y1gH4y5bFZ5+1fpV2XmSIapyyilEkr 5pe1SipZazZJT/UB/2g2GfXGtW7v4+G7YrFZoS64/lSi98Ocb9/x0nfi11fN4SmEXm/1 VN22RXa/WQWWC1sZgCbDwIGgEsX3vSfF1yA0TNZKRlYxTQZgFm13ha1FpYktNgb0VJL8 iupA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=PmNcEj0iVHsjcdS3ciW97nt9jd0kFelREIRE2D142p0=; b=B41xFUS7SRUTaLXoS3bAs4XXkTt62nC19/2fPTKTbCgU5qG7f11lInhQ/OGmvPR5u0 MBkZ8CWNSRhXScr6KgZAimpUdmJsicQlWjUhNm5XsDJmMVzYAYbk33NW/c5FgFFY5R1D w/ujYzJgLDtH0xJQtSJURglAzxYYoMe5kB0hQy5lMDUuQ820RhMs43f5XSGhwVlK3u25 Z3rErPVKoUy/xp1O6m4+omZH9rE5V3lK5qwo4rxxjYB/9oBtI5sfYPuZeFwqxqDXJlQb h4Pheth5UIGwJ3f+5+ubAn20a2yiYZbWYX4cA6kzFGvJo1xcPBDza5AhfbTqGP6KVy+r xgRQ== X-Gm-Message-State: APjAAAWVrHsfOJlwV0pU5pMqdZqe+Nk6hN8cM+vnY+yjYWpM4uwk6SpS /AlbSj/bjzBqXD1IvO2IopvqlQiKXBSJWxVUpYg= X-Google-Smtp-Source: APXvYqwlkdlK1Ix2LiB9zIt/NdtVOg4htF+TXX1vqKmmKC2/GAl/8A0xllZAkyZTzwo/e/miW17Dahwbvqhzw8tLZcc= X-Received: by 2002:a02:7715:: with SMTP id g21mr12864325jac.104.1581944800937; Mon, 17 Feb 2020 05:06:40 -0800 (PST) MIME-Version: 1.0 References: <20200217164345.6207-1-taox.zhu@intel.com> In-Reply-To: <20200217164345.6207-1-taox.zhu@intel.com> From: Jerin Jacob Date: Mon, 17 Feb 2020 18:36:25 +0530 Message-ID: To: taox.zhu@intel.com Cc: Jerin Jacob , Nithin Dabilpuram , Vamsi Attunuru , dpdk-dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] mempool/octeontx2: fix compile issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Feb 17, 2020 at 1:39 PM wrote: > > From: Tao Zhu > > Change the definition of C99 style to C90 style. > compile log as below: > > otx2_mempool_ops.c: In function =E2=80=98otx2_npa_populate=E2=80=99: > /dpdk/drivers/mempool/octeontx2/otx2_mempool_ops.c:790:2: error: \ > =E2=80=98for=E2=80=99 loop initial declarations are only allowed = in C99 mode > for (int i =3D 0; i < OTX2_L1D_NB_SETS; i++) > ^ > /dpdk/drivers/mempool/octeontx2/otx2_mempool_ops.c:790:2: \ > note: use option -std=3Dc99 or -std=3Dgnu99 to compile your code > /dpdk/drivers/mempool/octeontx2/otx2_mempool_ops.c: At top level: > cc1: error: unrecognized command line option \ > "-Wno-address-of-packed-member" [-Werror] > cc1: all warnings being treated as errors > make[6]: *** [otx2_mempool_ops.o] Error 1 > make[5]: *** [octeontx2] Error 2 > make[4]: *** [mempool] Error 2 > > Fixes: 9ed8e95c ("mempool/octeontx2: optimize for L1D cache architecture"= ) > > Signed-off-by: Tao Zhu Just for understanding purposes, Why one need to use C90 instead of C99? May I know, What environment, Do you see this issue? In any case, Reviewed-by: Jerin Jacob > --- > drivers/mempool/octeontx2/otx2_mempool_ops.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempo= ol/octeontx2/otx2_mempool_ops.c > index 6b55447..ac2d618 100644 > --- a/drivers/mempool/octeontx2/otx2_mempool_ops.c > +++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c > @@ -754,6 +754,7 @@ > size_t total_elt_sz; > uint8_t set; > size_t off; > + int i; > > if (iova =3D=3D RTE_BAD_IOVA) > return -EINVAL; > @@ -787,7 +788,7 @@ > otx2_npa_dbg("requested objects %"PRIu64", possible objects %"PRI= u64"", > (uint64_t)max_objs, (uint64_t)(len / total_elt_sz)); > otx2_npa_dbg("L1D set distribution :"); > - for (int i =3D 0; i < OTX2_L1D_NB_SETS; i++) > + for (i =3D 0; i < OTX2_L1D_NB_SETS; i++) > otx2_npa_dbg("set[%d] : objects : %"PRIu64"", i, > distribution[i]); > > -- > 1.8.3.1 >