* [dpdk-dev] [PATCH] mempool/octeontx2: fix build with ICC
@ 2019-06-26 23:07 Stephen Hemminger
2019-06-27 7:57 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2019-06-26 23:07 UTC (permalink / raw)
To: jerinj; +Cc: dev, Stephen Hemminger
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 meanlingless 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>
---
drivers/mempool/octeontx2/otx2_mempool_ops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c
index 25170015a397..97146d1fe4e3 100644
--- a/drivers/mempool/octeontx2/otx2_mempool_ops.c
+++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c
@@ -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++) {
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] mempool/octeontx2: fix build with ICC
2019-06-26 23:07 [dpdk-dev] [PATCH] mempool/octeontx2: fix build with ICC Stephen Hemminger
@ 2019-06-27 7:57 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2019-06-27 7:57 UTC (permalink / raw)
To: Stephen Hemminger, jerinj, Thomas Monjalon; +Cc: dev
On 6/27/2019 12:07 AM, Stephen Hemminger wrote:
> 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 meanlingless 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-27 7:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 23:07 [dpdk-dev] [PATCH] mempool/octeontx2: fix build with ICC Stephen Hemminger
2019-06-27 7:57 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).