From patchwork Thu Jan 2 17:48:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dharmik Thakkar X-Patchwork-Id: 64174 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2852BA04F3; Thu, 2 Jan 2020 18:50:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AC1D81C1C5; Thu, 2 Jan 2020 18:49:29 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 470091C195 for ; Thu, 2 Jan 2020 18:49:17 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8A2FF1396; Thu, 2 Jan 2020 09:49:16 -0800 (PST) Received: from dp6132.usa.Arm.com (dp6132.usa.arm.com [10.118.91.150]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 856C13F703; Thu, 2 Jan 2020 09:49:16 -0800 (PST) From: Dharmik Thakkar To: Rasesh Mody , Shahed Shaikh Cc: dev@dpdk.org, Dharmik Thakkar Date: Thu, 2 Jan 2020 17:48:38 +0000 Message-Id: <20200102174838.12908-8-dharmik.thakkar@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200102174838.12908-1-dharmik.thakkar@arm.com> References: <20191003224419.23968-1-dharmik.thakkar@arm.com> <20200102174838.12908-1-dharmik.thakkar@arm.com> Subject: [dpdk-dev] [PATCH v2 7/7] net/qede: remove 'typedef int bool' X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Replace 'typedef int bool' with 'stdbool.h' to avoid possible multiple definitions of 'bool'. (Not sure if the previous code is checking for true/false condition. Recommend careful review on this patch.) Signed-off-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang --- drivers/net/qede/base/bcm_osal.h | 5 +---- drivers/net/qede/base/ecore_vf.c | 2 +- drivers/net/qede/qede_ethdev.c | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h index 0f09557cf06c..513f6a8b429f 100644 --- a/drivers/net/qede/base/bcm_osal.h +++ b/drivers/net/qede/base/bcm_osal.h @@ -7,6 +7,7 @@ #ifndef __BCM_OSAL_H #define __BCM_OSAL_H +#include #include #include #include @@ -71,10 +72,6 @@ typedef size_t osal_size_t; typedef intptr_t osal_int_ptr_t; -typedef int bool; -#define true 1 -#define false 0 - #define nothing do {} while (0) /* Delays */ diff --git a/drivers/net/qede/base/ecore_vf.c b/drivers/net/qede/base/ecore_vf.c index 24846cfb51da..c5c081426281 100644 --- a/drivers/net/qede/base/ecore_vf.c +++ b/drivers/net/qede/base/ecore_vf.c @@ -446,7 +446,7 @@ static enum _ecore_status_t ecore_vf_pf_acquire(struct ecore_hwfn *p_hwfn) } /* @DPDK */ - if ((~p_iov->b_pre_fp_hsi & + if (((p_iov->b_pre_fp_hsi == true) & ETH_HSI_VER_MINOR) && (resp->pfdev_info.minor_fp_hsi < ETH_HSI_VER_MINOR)) DP_INFO(p_hwfn, diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 19d2e961913d..af99ce9c65e6 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -450,7 +450,7 @@ int qede_activate_vport(struct rte_eth_dev *eth_dev, bool flg) params.update_vport_active_tx_flg = 1; params.vport_active_rx_flg = flg; params.vport_active_tx_flg = flg; - if (~qdev->enable_tx_switching & flg) { + if ((qdev->enable_tx_switching == false) && (flg == true)) { params.update_tx_switching_flg = 1; params.tx_switching_flg = !flg; }