net/ionic: use standard boolean type
authorSunil Kumar Kori <skori@marvell.com>
Mon, 9 Mar 2020 09:09:27 +0000 (14:39 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 18 Mar 2020 09:21:42 +0000 (10:21 +0100)
commite40303eb0ff6389fab499ddc55a8203276451232
tree87f14903080b9db18c1cb3c235104a2c87e35819
parenteb4f9b6a55002a4abc1a4e9eca2a89174fd6ce2b
net/ionic: use standard boolean type

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

Fixes: 5ef518098ec6 ("net/ionic: register and initialize adapter")
Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Alfredo Cardigliano <cardigliano@ntop.org>
drivers/net/ionic/ionic_dev.c
drivers/net/ionic/ionic_dev.h
drivers/net/ionic/ionic_mac_api.c
drivers/net/ionic/ionic_main.c
drivers/net/ionic/ionic_osdep.h
drivers/net/ionic/ionic_rx_filter.c