eventdev: fix build with clang on ARM
authorGavin Hu <gavin.hu@arm.com>
Thu, 17 May 2018 02:46:09 +0000 (10:46 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 20 May 2018 22:55:50 +0000 (00:55 +0200)
commit454878ff834449ecd55fdb00b8da249c89e7ca75
tree937422b8dde0e00c9563a152101a458f306527c8
parent74572f23cd6003d93007ebd3131d93833215463e
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>
lib/librte_eventdev/rte_event_crypto_adapter.c