eventdev: fix build with clang on ARM

This patch fix the clang compiling issue reported on the ARM64
builing hosts. ev is a pointer in size of 64bit, but herein
it should be the size of its content.

lib/librte_eventdev/rte_event_crypto_adapter.c:530:49: error:
'rte_memcpy' call operates on objects of type 'struct rte_event'
while the size is based on a different type
      'struct rte_event *' [-Werror,-Wsizeof-pointer-memaccess]
                rte_memcpy(ev, &m_data->response_info, sizeof(ev));
lib/librte_eventdev/rte_event_crypto_adapter.c:530:49:
note: did you mean to dereference the argument to 'sizeof' (and multiply
it by the number of elements)?
      rte_memcpy(ev, &m_data->response_info, sizeof(ev));

Fixes: 7901eac340 ("eventdev: add crypto adapter implementation")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
This commit is contained in:
Gavin Hu 2018-05-17 10:46:09 +08:00 committed by Thomas Monjalon
parent 74572f23cd
commit 454878ff83

View File

@ -527,7 +527,7 @@ eca_ops_enqueue_burst(struct rte_event_crypto_adapter *adapter,
continue;
}
rte_memcpy(ev, &m_data->response_info, sizeof(ev));
rte_memcpy(ev, &m_data->response_info, sizeof(*ev));
ev->event_ptr = ops[i];
ev->event_type = RTE_EVENT_TYPE_CRYPTODEV;
if (adapter->implicit_release_disabled)