From: Tao Zhu Date: Mon, 17 Feb 2020 16:43:45 +0000 (+0000) Subject: mempool/octeontx2: fix build X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=bc3282125b72ccfe8641f0826955a384f40ca775;p=dpdk.git mempool/octeontx2: fix build Change the definition of C99 style to C90 style. compile log as below: otx2_mempool_ops.c: In function ‘otx2_npa_populate’: 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++) ^ drivers/mempool/octeontx2/otx2_mempool_ops.c:790:2: note: use option -std=c99 or -std=gnu99 to compile your code Fixes: 9ed8e95c ("mempool/octeontx2: optimize for L1D cache architecture") Signed-off-by: Tao Zhu Reviewed-by: Jerin Jacob --- diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c index 6b554471d2..ac2d618616 100644 --- a/drivers/mempool/octeontx2/otx2_mempool_ops.c +++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c @@ -754,6 +754,7 @@ otx2_npa_populate(struct rte_mempool *mp, unsigned int max_objs, void *vaddr, 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_populate(struct rte_mempool *mp, unsigned int max_objs, void *vaddr, 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]);