net/bnxt: fix null pointer dereference
[dpdk.git] / drivers / event / dpaa / dpaa_eventdev.c
index b8761c6..a3c138b 100644 (file)
@@ -1,5 +1,5 @@
 /*   SPDX-License-Identifier:        BSD-3-Clause
- *   Copyright 2017 NXP
+ *   Copyright 2017-2019 NXP
  */
 
 #include <assert.h>
@@ -46,6 +46,7 @@
  * Eventqueue = Channel Instance
  * 1 Eventdev can have N Eventqueue
  */
+RTE_LOG_REGISTER(dpaa_logtype_eventdev, pmd.event.dpaa, NOTICE);
 
 #define DISABLE_INTR_MODE "disable_intr"
 
@@ -178,7 +179,7 @@ dpaa_event_dequeue_burst(void *port, struct rte_event ev[],
        struct dpaa_port *portal = (struct dpaa_port *)port;
        struct rte_mbuf *mbuf;
 
-       if (unlikely(!RTE_PER_LCORE(dpaa_io))) {
+       if (unlikely(!DPAA_PER_LCORE_PORTAL)) {
                /* Affine current thread context to a qman portal */
                ret = rte_dpaa_portal_init((void *)0);
                if (ret) {
@@ -250,7 +251,7 @@ dpaa_event_dequeue_burst_intr(void *port, struct rte_event ev[],
        struct dpaa_port *portal = (struct dpaa_port *)port;
        struct rte_mbuf *mbuf;
 
-       if (unlikely(!RTE_PER_LCORE(dpaa_io))) {
+       if (unlikely(!DPAA_PER_LCORE_PORTAL)) {
                /* Affine current thread context to a qman portal */
                ret = rte_dpaa_portal_init((void *)0);
                if (ret) {