diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-19 10:15:59 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-31 23:24:36 -0400 |
commit | d2787efcfe68fee59433dc6d5f66f7edcdb94799 (patch) | |
tree | 8625d2e9f0fe63cda9b6c3e5479374595967bdc4 | |
parent | debf3c33bcd3bcb12e774a7bf96bf669cddd6b21 (diff) | |
download | u-boot-d2787efcfe68fee59433dc6d5f66f7edcdb94799.tar.gz |
dm: core: Guard against including dm.h in header files
Header files generally should not include header files just for a struct,
since forward declarations work just as well and reduce overhead.
Add a warning for dm.h being included, since this has crept into U-Boot.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | include/dm.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/dm.h b/include/dm.h index 2e1afda440..a1b84169e6 100644 --- a/include/dm.h +++ b/include/dm.h @@ -3,6 +3,10 @@ * Copyright (c) 2013 Google, Inc */ +#ifdef _DM_H_ +#warning "Suspect dm.h is included from a header file - please fix" +#endif + #ifndef _DM_H_ #define _DM_H_ |