ethdev: fix build with icc
authorTetsuya Mukawa <mukawa@igel.co.jp>
Fri, 27 Feb 2015 05:20:34 +0000 (14:20 +0900)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 27 Feb 2015 23:14:51 +0000 (00:14 +0100)
This patch fixes following errors with icc.
  error #188: enumerated type mixed with another type
    return -1;

Fixes: 92d94d3744d7 ("ethdev: attach or detach port")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: John McNamara <john.mcnamara@intel.com>
lib/librte_ether/rte_ethdev.c

index bb94ccb..6ea7a17 100644 (file)
@@ -433,7 +433,7 @@ static enum rte_eth_dev_type
 rte_eth_dev_get_device_type(uint8_t port_id)
 {
        if (!rte_eth_dev_is_valid_port(port_id))
-               return -1;
+               return RTE_ETH_DEV_UNKNOWN;
        return rte_eth_devices[port_id].dev_type;
 }