diff options
author | Vadim Sukhomlinov <sukhomlinov@google.com> | 2020-06-22 17:35:54 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-11 23:39:00 +0000 |
commit | feb8f28e5e77909e22134eb51ed8a53cdfdfee69 (patch) | |
tree | a75d0684a166f1348317ec358c8351d44ef94f97 | |
parent | c5d6b8f73eaaca4a54b1fca582034275b103c092 (diff) | |
download | chrome-ec-feb8f28e5e77909e22134eb51ed8a53cdfdfee69.tar.gz |
common.h: consolidate stdbool.h and stddef.h
Many source files over time started to respect 'bool' and 'size_t'
types for better code readability. However, these types are defined
in stdbool.h and stddef.h headers, so each time they were used
there was a need to include them. util.h included both, and one option
was to use it, but it conflicts with TPM2 library on definition MAX/MIN
BUG=none
TEST=make buildall -j
Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com>
Change-Id: Ia0aca578e901c60aeafee5278471c228194d36bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2258540
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
(cherry picked from commit 3f0b2cb3b3b21b324f899e1912d8402c94ccb07e)
Change-Id: Id2643b6162a26c2e031677f614944913e3218849
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2314579
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Commit-Queue: Mary Ruthven <mruthven@chromium.org>
(cherry picked from commit dc919240e80218122cd51e22e93cf46166bd1f60)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2350289
-rw-r--r-- | board/cr50/board.h | 3 | ||||
-rw-r--r-- | board/cr50/int_ap_extension.c | 1 | ||||
-rw-r--r-- | include/common.h | 2 | ||||
-rw-r--r-- | include/dma.h | 1 | ||||
-rw-r--r-- | include/util.h | 2 |
5 files changed, 4 insertions, 5 deletions
diff --git a/board/cr50/board.h b/board/cr50/board.h index 0f97ba6c1a..36e0cfe28b 100644 --- a/board/cr50/board.h +++ b/board/cr50/board.h @@ -5,7 +5,6 @@ #ifndef __CROS_EC_BOARD_H #define __CROS_EC_BOARD_H -#include <stdbool.h> #define CONFIG_LTO @@ -156,7 +155,7 @@ #define CONFIG_HW_SPECIFIC_UDELAY #ifndef __ASSEMBLER__ - +#include "common.h" #include "gpio_signal.h" /* USB string indexes */ diff --git a/board/cr50/int_ap_extension.c b/board/cr50/int_ap_extension.c index bacb44ad4d..e5c66c19f9 100644 --- a/board/cr50/int_ap_extension.c +++ b/board/cr50/int_ap_extension.c @@ -9,7 +9,6 @@ #include "console.h" #include "gpio.h" #include "registers.h" -#include "stdbool.h" #include "task.h" #include "timer.h" diff --git a/include/common.h b/include/common.h index 793e1244ae..807fb3e985 100644 --- a/include/common.h +++ b/include/common.h @@ -8,6 +8,8 @@ #ifndef __CROS_EC_COMMON_H #define __CROS_EC_COMMON_H +#include <stdbool.h> +#include <stddef.h> #include <stdint.h> #include <inttypes.h> diff --git a/include/dma.h b/include/dma.h index 03d4d3bdb6..b3310ca8ba 100644 --- a/include/dma.h +++ b/include/dma.h @@ -13,6 +13,7 @@ #include "common.h" #include "registers.h" + /* DMA channel options */ struct dma_option { enum dma_channel channel; /* DMA channel */ diff --git a/include/util.h b/include/util.h index 5683646b44..beecf2dab7 100644 --- a/include/util.h +++ b/include/util.h @@ -13,8 +13,6 @@ #include "panic.h" #include "builtin/assert.h" /* For ASSERT(). */ -#include <stdbool.h> -#include <stddef.h> #ifdef __cplusplus extern "C" { |