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 2AA3EA0551; Mon, 17 Feb 2020 09:09:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 54D1058C4; Mon, 17 Feb 2020 09:09:01 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id B89402C4F for ; Mon, 17 Feb 2020 09:08:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2020 00:08:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,451,1574150400"; d="scan'208";a="348448345" Received: from unknown (HELO localhost.localdomain) ([10.239.250.16]) by fmsmga001.fm.intel.com with ESMTP; 17 Feb 2020 00:08:56 -0800 From: taox.zhu@intel.com To: jerinj@marvell.com, ndabilpuram@marvell.com, vattunuru@marvell.com Cc: dev@dpdk.org, Tao Zhu Date: Mon, 17 Feb 2020 16:43:45 +0000 Message-Id: <20200217164345.6207-1-taox.zhu@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [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" From: Tao Zhu Change the definition of C99 style to C90 style. compile log as below: otx2_mempool_ops.c: In function ‘otx2_npa_populate’: /dpdk/drivers/mempool/octeontx2/otx2_mempool_ops.c:790:2: error: \ ‘for’ loop initial declarations are only allowed in C99 mode for (int i = 0; i < OTX2_L1D_NB_SETS; i++) ^ /dpdk/drivers/mempool/octeontx2/otx2_mempool_ops.c:790:2: \ note: use option -std=c99 or -std=gnu99 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 --- 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/mempool/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 == RTE_BAD_IOVA) return -EINVAL; @@ -787,7 +788,7 @@ otx2_npa_dbg("requested objects %"PRIu64", possible objects %"PRIu64"", (uint64_t)max_objs, (uint64_t)(len / total_elt_sz)); otx2_npa_dbg("L1D set distribution :"); - for (int i = 0; i < OTX2_L1D_NB_SETS; i++) + for (i = 0; i < OTX2_L1D_NB_SETS; i++) otx2_npa_dbg("set[%d] : objects : %"PRIu64"", i, distribution[i]); -- 1.8.3.1