net/mlx5: fix icc build
authorNélio Laranjeiro <nelio.laranjeiro@6wind.com>
Mon, 19 Mar 2018 10:42:16 +0000 (11:42 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:44 +0000 (14:08 +0200)
Remove the second declaration of device_attr [1] inside the loop as well as
the query_device_ex() which has already been done outside of the loop.

[1] https://dpdk.org/ml/archives/dev/2018-March/091744.html

Fixes: 9a761de8ea14 ("net/mlx5: flow counter support")
Cc: stable@dpdk.org
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/mlx5/mlx5.c

index 95dd494..7d58d66 100644 (file)
@@ -723,7 +723,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
                struct rte_eth_dev *eth_dev = NULL;
                struct ibv_device_attr_ex device_attr_ex;
                struct ether_addr mac;
-               struct ibv_device_attr_ex device_attr;
                struct mlx5_dev_config config = {
                        .cqe_comp = cqe_comp,
                        .mps = mps,
@@ -780,7 +779,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
                        err = ENODEV;
                        goto port_error;
                }
-               mlx5_glue->query_device_ex(ctx, NULL, &device_attr);
                /* Check port status. */
                err = mlx5_glue->query_port(ctx, port, &port_attr);
                if (err) {