X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Fmlx5%2Fmlx5_mr.c;h=dbcf0aac9d2c8d96045fdcb2cd74678f352bd572;hb=96b1f0273c91fa29842eac4eb844aa0e1624e525;hp=adbe07c4c78362cf491c058d40bd203f7eb71548;hpb=d5ed8aa9449d5a4d5772333c5196f89b7337fcbb;p=dpdk.git diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c index adbe07c4c7..dbcf0aac9d 100644 --- a/drivers/net/mlx5/mlx5_mr.c +++ b/drivers/net/mlx5/mlx5_mr.c @@ -3,21 +3,12 @@ * Copyright 2016 Mellanox Technologies, Ltd */ -#ifdef PEDANTIC -#pragma GCC diagnostic ignored "-Wpedantic" -#endif -#include -#ifdef PEDANTIC -#pragma GCC diagnostic error "-Wpedantic" -#endif - #include #include #include #include #include -#include #include #include @@ -313,9 +304,10 @@ pci_dev_to_eth_dev(struct rte_pci_device *pdev) { uint16_t port_id; - RTE_ETH_FOREACH_DEV_OF(port_id, &pdev->device) - return &rte_eth_devices[port_id]; - return NULL; + port_id = rte_eth_find_next_of(0, &pdev->device); + if (port_id == RTE_MAX_ETHPORTS) + return NULL; + return &rte_eth_devices[port_id]; } /**