From patchwork Mon Mar 9 07:53:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sunil Kumar Kori X-Patchwork-Id: 66379 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 C5768A052E; Mon, 9 Mar 2020 08:53:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F25E1C001; Mon, 9 Mar 2020 08:53:42 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id BF0881BECF; Mon, 9 Mar 2020 08:53:40 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0297pKMI001376; Mon, 9 Mar 2020 00:53:39 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=pfpt0818; bh=QGMZYkfMHAcVTx0XPBsnoQSiC2SSkDw/DLpcp6Rrzxo=; b=cYIYugb/+4G5gD0RmrIuhuBuPtGwCfJjIKi4j6EcD2bmBpsRL9jzd3721sPku6capEHp 06BhR3uG93uLWMXkX7oZJLfG2Qe4jOqI6C818o8uXADRKXB02ULtamNUgkYn9bik2LEB h+ATyIcEvk1K1tEcoMp9TWewYDXaQ4xTT8t67Y084EazTGTUfSCVEL/ZOTyEfEJgPO+M UQ7N+ZcTvDGLxKWMmwv5Q4CPfy/9+jzjBfyVbZ0FV8lxdiim2Yg40CmdFD0dWZfeaNTh 1ODMXD7ksgYA2dpOxfcb0aceFVO1B9Ugo2Qp1l63e2EPqoYVhFyhbldyOYfskxpYo7X8 Kg== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2ymc0snr9v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 09 Mar 2020 00:53:39 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 9 Mar 2020 00:53:37 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 9 Mar 2020 00:53:37 -0700 Received: from localhost.localdomain (unknown [10.28.34.200]) by maili.marvell.com (Postfix) with ESMTP id 4E8283F703F; Mon, 9 Mar 2020 00:53:36 -0700 (PDT) From: Sunil Kumar Kori To: Alfredo Cardigliano CC: , , Sunil Kumar Kori Date: Mon, 9 Mar 2020 13:23:28 +0530 Message-ID: <20200309075328.23351-1-skori@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-03-09_02:2020-03-06, 2020-03-09 signatures=0 Subject: [dpdk-dev] [PATCH v2 1/1] net/ionic: use standard stdbool.h 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" Any DPDK public header file which includes stdbool.h may conflict with local definition of bool, if any, which further results in compilation error. To avoid, used standard stdbool.h instead of defining bool internally. I observed this issue during a development where I included rte_uuid.h into rte_ethdev.h. As rte_ethdev.h is included to PMD driver, it started throwing error as given below: CC ionic_rxtx.o In file included from .../dpdk/build/include/rte_uuid.h:17:0, from .../dpdk/build/include/rte_ethdev.h:161, from .../dpdk/build/include/rte_ethdev_driver.h:18, from .../dpdk/drivers/net/ionic/ionic_rxtx.c:34: .../dpdk/drivers/net/ionic/ionic_osdep.h:48:17: error: two or more data types in declaration specifiers typedef uint8_t bool; ^ In file included from .../dpdk/drivers/net/ionic/ionic_dev.h:8:0, from .../dpdk/drivers/net/ionic/ionic.h:13, from .../dpdk/drivers/net/ionic/ionic_mac_api.h:8, from .../dpdk/drivers/net/ionic/ionic_rxtx.c:45: .../dpdk/drivers/net/ionic/ionic_osdep.h:48:1: warning: useless type name in empty declaration typedef uint8_t bool; ^~~~~~~ cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’ .../dpdk/mk/internal/rte.compile-pre.mk:114: recipe for target 'ionic_rxtx.o' failed Signed-off-by: Sunil Kumar Kori --- v2: - include stdbool.h in ionic_dev.h. drivers/net/ionic/ionic_dev.c | 1 + drivers/net/ionic/ionic_dev.h | 2 ++ drivers/net/ionic/ionic_mac_api.c | 1 + drivers/net/ionic/ionic_main.c | 1 + drivers/net/ionic/ionic_osdep.h | 1 - drivers/net/ionic/ionic_rx_filter.c | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ionic/ionic_dev.c b/drivers/net/ionic/ionic_dev.c index aba388115..fe111a515 100644 --- a/drivers/net/ionic/ionic_dev.c +++ b/drivers/net/ionic/ionic_dev.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) * Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved. */ +#include #include diff --git a/drivers/net/ionic/ionic_dev.h b/drivers/net/ionic/ionic_dev.h index 8c1ec13a6..532255a60 100644 --- a/drivers/net/ionic/ionic_dev.h +++ b/drivers/net/ionic/ionic_dev.h @@ -5,6 +5,8 @@ #ifndef _IONIC_DEV_H_ #define _IONIC_DEV_H_ +#include + #include "ionic_osdep.h" #include "ionic_if.h" #include "ionic_regs.h" diff --git a/drivers/net/ionic/ionic_mac_api.c b/drivers/net/ionic/ionic_mac_api.c index 189b8b81a..40421fd4e 100644 --- a/drivers/net/ionic/ionic_mac_api.c +++ b/drivers/net/ionic/ionic_mac_api.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) * Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved. */ +#include #include "ionic_mac_api.h" diff --git a/drivers/net/ionic/ionic_main.c b/drivers/net/ionic/ionic_main.c index b828d230d..9d74ec73e 100644 --- a/drivers/net/ionic/ionic_main.c +++ b/drivers/net/ionic/ionic_main.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) * Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved. */ +#include #include diff --git a/drivers/net/ionic/ionic_osdep.h b/drivers/net/ionic/ionic_osdep.h index ecdbc24e6..6ca5426ec 100644 --- a/drivers/net/ionic/ionic_osdep.h +++ b/drivers/net/ionic/ionic_osdep.h @@ -45,7 +45,6 @@ typedef uint32_t __le32; typedef uint64_t __le64; #ifndef __cplusplus -typedef uint8_t bool; #define false 0 #define true 1 #endif diff --git a/drivers/net/ionic/ionic_rx_filter.c b/drivers/net/ionic/ionic_rx_filter.c index f75b81a27..fe624538d 100644 --- a/drivers/net/ionic/ionic_rx_filter.c +++ b/drivers/net/ionic/ionic_rx_filter.c @@ -3,6 +3,7 @@ */ #include +#include #include