summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVadim Sukhomlinov <sukhomlinov@google.com>2020-06-22 17:35:54 -0700
committerCommit Bot <commit-bot@chromium.org>2020-06-25 23:22:35 +0000
commit3f0b2cb3b3b21b324f899e1912d8402c94ccb07e (patch)
tree41a694020b3986e635b4568c8d6dd98ba2cf0d24 /include
parentc8e570f49157412f058bd272c0e3cdf5324a634d (diff)
downloadchrome-ec-3f0b2cb3b3b21b324f899e1912d8402c94ccb07e.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>
Diffstat (limited to 'include')
-rw-r--r--include/common.h2
-rw-r--r--include/dma.h1
-rw-r--r--include/util.h2
3 files changed, 2 insertions, 3 deletions
diff --git a/include/common.h b/include/common.h
index 62f7d438d0..485cbcbe5c 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>
#include "compile_time_macros.h"
diff --git a/include/dma.h b/include/dma.h
index 1687b5f899..9da83508ad 100644
--- a/include/dma.h
+++ b/include/dma.h
@@ -13,7 +13,6 @@
#include "common.h"
#include "registers.h"
-#include <stdbool.h>
/* DMA channel options */
struct dma_option {
diff --git a/include/util.h b/include/util.h
index 43d9a71992..68bcbabd9b 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" {