lpm: avoid race conditions for v1604
[dpdk.git] / lib / librte_eventdev / rte_eventdev.c
index cc3199f..f44c869 100644 (file)
@@ -889,18 +889,18 @@ rte_event_port_link(uint8_t dev_id, uint8_t port_id,
        uint16_t *links_map;
        int i, diag;
 
-       RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, -EINVAL, 0);
+       RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, EINVAL, 0);
        dev = &rte_eventdevs[dev_id];
 
        if (*dev->dev_ops->port_link == NULL) {
                RTE_EDEV_LOG_ERR("Function not supported\n");
-               rte_errno = -ENOTSUP;
+               rte_errno = ENOTSUP;
                return 0;
        }
 
        if (!is_valid_port(dev, port_id)) {
                RTE_EDEV_LOG_ERR("Invalid port_id=%" PRIu8, port_id);
-               rte_errno = -EINVAL;
+               rte_errno = EINVAL;
                return 0;
        }
 
@@ -921,7 +921,7 @@ rte_event_port_link(uint8_t dev_id, uint8_t port_id,
 
        for (i = 0; i < nb_links; i++)
                if (queues[i] >= dev->data->nb_queues) {
-                       rte_errno = -EINVAL;
+                       rte_errno = EINVAL;
                        return 0;
                }
 
@@ -948,18 +948,18 @@ rte_event_port_unlink(uint8_t dev_id, uint8_t port_id,
        int i, diag, j;
        uint16_t *links_map;
 
-       RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, -EINVAL, 0);
+       RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, EINVAL, 0);
        dev = &rte_eventdevs[dev_id];
 
        if (*dev->dev_ops->port_unlink == NULL) {
                RTE_EDEV_LOG_ERR("Function not supported");
-               rte_errno = -ENOTSUP;
+               rte_errno = ENOTSUP;
                return 0;
        }
 
        if (!is_valid_port(dev, port_id)) {
                RTE_EDEV_LOG_ERR("Invalid port_id=%" PRIu8, port_id);
-               rte_errno = -EINVAL;
+               rte_errno = EINVAL;
                return 0;
        }
 
@@ -988,7 +988,7 @@ rte_event_port_unlink(uint8_t dev_id, uint8_t port_id,
        nb_unlinks = j;
        for (i = 0; i < nb_unlinks; i++)
                if (queues[i] >= dev->data->nb_queues) {
-                       rte_errno = -EINVAL;
+                       rte_errno = EINVAL;
                        return 0;
                }