[dpdk-dev] eal: Fix build issue of hotplug with icc

Message ID 1425014434-15147-1-git-send-email-mukawa@igel.co.jp (mailing list archive)
State Accepted, archived
Headers

Commit Message

Tetsuya Mukawa Feb. 27, 2015, 5:20 a.m. UTC
  This patch fixes following errors with icc.

 error #188: enumerated type mixed with another type
  		return -1;

Reported-by: Mcnamara, John <john.mcnamara@intel.com>
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
---
 lib/librte_ether/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

John McNamara Feb. 27, 2015, 4:58 p.m. UTC | #1
> -----Original Message-----
> From: Tetsuya Mukawa [mailto:mukawa@igel.co.jp]
> Sent: Friday, February 27, 2015 5:21 AM
> To: dev@dpdk.org
> Cc: Mcnamara, John; Tetsuya Mukawa
> Subject: [PATCH] eal: Fix build issue of hotplug with icc
> 
> This patch fixes following errors with icc.
> 
>  error #188: enumerated type mixed with another type
>   		return -1;


Confirmed that this fixes the issue with ICC 13.1.1.

Acked-by: John McNamara <john.mcnamara@intel.com>

--
  
Thomas Monjalon Feb. 27, 2015, 11:18 p.m. UTC | #2
> > This patch fixes following errors with icc.
> > 
> >  error #188: enumerated type mixed with another type
> >   		return -1;
> 
> 
> Confirmed that this fixes the issue with ICC 13.1.1.
> 
> Acked-by: John McNamara <john.mcnamara@intel.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index bb94ccb..6ea7a17 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -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;
 }