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 <taox.zhu@intel.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
size_t total_elt_sz;
uint8_t set;
size_t off;
+ int i;
if (iova == RTE_BAD_IOVA)
return -EINVAL;
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]);