[dpdk-dev,v2] bnx2x: fix icc compilation error
Commit Message
Fix icc warning:
error #188: enumerated type mixed with another type
Fixed the code for simple cases caused the warning.
Still need to disable compiler warning because of more complex case.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/bnx2x/Makefile | 4 ++++
drivers/net/bnx2x/elink.c | 8 ++++----
2 files changed, 8 insertions(+), 4 deletions(-)
Comments
> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> Sent: Monday, June 27, 2016 9:03 AM
>
> Fix icc warning:
> error #188: enumerated type mixed with another type
>
> Fixed the code for simple cases caused the warning.
> Still need to disable compiler warning because of more complex case.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Rasesh Mody <rasesh.mody@qlogic.com>
Thanks Ferruh!
On Mon, Jun 27, 2016 at 11:21:45PM +0000, Rasesh Mody wrote:
> > From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> > Sent: Monday, June 27, 2016 9:03 AM
> >
> > Fix icc warning:
> > error #188: enumerated type mixed with another type
> >
> > Fixed the code for simple cases caused the warning.
> > Still need to disable compiler warning because of more complex case.
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Acked-by: Rasesh Mody <rasesh.mody@qlogic.com>
>
> Thanks Ferruh!
Applied to dpdk-next-net/rel_16_07
/Bruce
@@ -14,6 +14,10 @@ EXPORT_MAP := rte_pmd_bnx2x_version.map
LIBABIVER := 1
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
+CFLAGS += -wd188 #188: enumerated type mixed with another type
+endif
+
#
# all source are stored in SRCS-y
#
@@ -5029,7 +5029,7 @@ static elink_status_t elink_direct_parallel_detect_used(struct elink_phy *phy,
if (status2_1000x & MDIO_SERDES_DIGITAL_A_1000X_STATUS2_AN_DISABLED) {
PMD_DRV_LOG(DEBUG, "1G parallel detect link on port %d",
params->port);
- return 1;
+ return ELINK_STATUS_ERROR;
}
CL22_RD_OVER_CL45(sc, phy,
@@ -5039,7 +5039,7 @@ static elink_status_t elink_direct_parallel_detect_used(struct elink_phy *phy,
if (pd_10g & MDIO_10G_PARALLEL_DETECT_PAR_DET_10G_STATUS_PD_LINK) {
PMD_DRV_LOG(DEBUG, "10G parallel detect link on port %d",
params->port);
- return 1;
+ return ELINK_STATUS_ERROR;
}
return ELINK_STATUS_OK;
}
@@ -6735,7 +6735,7 @@ static elink_status_t elink_8073_is_snr_needed(struct bnx2x_softc *sc,
if (val != 0x102)
return ELINK_STATUS_OK;
- return 1;
+ return ELINK_STATUS_ERROR;
}
static elink_status_t elink_8073_xaui_wa(struct bnx2x_softc *sc,
@@ -7557,7 +7557,7 @@ static elink_status_t elink_read_sfp_module_eeprom(struct elink_phy *phy,
uint16_t byte_cnt,
uint8_t * o_buf)
{
- elink_status_t rc = 0;
+ elink_status_t rc = ELINK_STATUS_OK;
uint8_t xfer_size;
uint8_t *user_data = o_buf;
read_sfp_module_eeprom_func_p read_func;