event/dpaa: fix integer overflow of max ports
authorGowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Fri, 13 Apr 2018 05:06:31 +0000 (10:36 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 16 Apr 2018 14:45:11 +0000 (16:45 +0200)
commit100915c0a51121fdbbb3be04aa73823f54e20cda
tree97aa3cef6730b13248ab21dbb875cee5571bf19b
parent6797eb65bf5b2a41d38eec28a2852ba45fa12836
event/dpaa: fix integer overflow of max ports

dev_info->max_event_ports is uint8_t. dpaa_event_dev_info_get assigns
DPAA_EVENT_MAX_EVENT_PORT (which is RTE_MAX_LCORE, upto 256 in ppc64le)
into this variable, which breaks compile in ppc64le.

drivers/event/dpaa/dpaa_eventdev.c: In function ‘dpaa_event_dev_info_get’:
   rte_config.h:23:23: error:
   large integer implicitly truncated to unsigned type [-Werror=overflow]
      #define RTE_MAX_LCORE 256

Fixes: 9caac5dd1e ("event/dpaa: introduce PMD")
Cc: stable@dpdk.org
Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Sunil Kumar Kori <sunil.kori@nxp.com>
drivers/event/dpaa/dpaa_eventdev.h