mempool/octeontx2: fix build with icc

The Intel compiler is pickier about casts and generates:
otx2_mempool_ops.c(344):
     error #191: type qualifier is meaningless on cast type
  	int64_t * const addr = (int64_t * const)
  	                        ^
This is because of the nature of const.
In this example, the expression is being cast into a pointer
that can not be modified. This is meaningless because the
expression is already a lvalue.

See https://en.wikipedia.org/wiki/Const_(computer_programming)

Fixes: d7a0da3c0043 ("mempool/octeontx2: add fast path mempool ops")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Stephen Hemminger 2019-06-26 16:07:42 -07:00 committed by Ferruh Yigit
parent 4e8854ae89
commit da5fa4d4d6

View File

@ -341,7 +341,7 @@ otx2_npa_deq(struct rte_mempool *mp, void **obj_table, unsigned int n)
unsigned int index;
uint64_t obj;
int64_t * const addr = (int64_t * const)
int64_t * const addr = (int64_t *)
(npa_lf_aura_handle_to_base(mp->pool_id) +
NPA_LF_AURA_OP_ALLOCX(0));
for (index = 0; index < n; index++, obj_table++) {