diff options
author | Simon Glass | 2020-07-19 10:15:59 -0600 |
---|---|---|
committer | Tom Rini | 2020-08-03 22:19:54 -0400 |
commit | a0558aca55c16a7f561656cb11bf172ef414bcec (patch) | |
tree | 3ea0bfaa597c7a2adcdc35b447b9d12726e92e20 /include/dm.h | |
parent | 41ba040e169dce7b575ab108e752deb8431d9809 (diff) |
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>
Diffstat (limited to 'include/dm.h')
-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 2e1afda4402..a1b84169e64 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_ |