From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 99C5F37B0 for ; Mon, 27 Jun 2016 18:03:06 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 27 Jun 2016 09:02:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,537,1459839600"; d="scan'208";a="836026710" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga003.jf.intel.com with ESMTP; 27 Jun 2016 09:02:36 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u5RG2aIc029976; Mon, 27 Jun 2016 17:02:36 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u5RG2ZP2022833; Mon, 27 Jun 2016 17:02:35 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u5RG2ZJs022829; Mon, 27 Jun 2016 17:02:35 +0100 X-Authentication-Warning: sivswdev02.ir.intel.com: fyigit set sender to ferruh.yigit@intel.com using -f From: Ferruh Yigit To: dev@dpdk.org Cc: Rasesh Mody , Harish Patil , Sony Chacko Date: Mon, 27 Jun 2016 17:02:33 +0100 Message-Id: <1467043353-22776-1-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1465814839-31304-1-git-send-email-ferruh.yigit@intel.com> References: <1465814839-31304-1-git-send-email-ferruh.yigit@intel.com> Subject: [dpdk-dev] [PATCH v2] bnx2x: fix icc compilation error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2016 16:03:07 -0000 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 --- drivers/net/bnx2x/Makefile | 4 ++++ drivers/net/bnx2x/elink.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnx2x/Makefile b/drivers/net/bnx2x/Makefile index 6f1f385..c2ddd8d 100644 --- a/drivers/net/bnx2x/Makefile +++ b/drivers/net/bnx2x/Makefile @@ -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 # diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c index b9149b8..149cc97 100644 --- a/drivers/net/bnx2x/elink.c +++ b/drivers/net/bnx2x/elink.c @@ -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; -- 2.5.5