diff options
Diffstat (limited to 'doc/develop/codingstyle.rst')
-rw-r--r-- | doc/develop/codingstyle.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/develop/codingstyle.rst b/doc/develop/codingstyle.rst index fa3cd6aec82..f6248cdcb1e 100644 --- a/doc/develop/codingstyle.rst +++ b/doc/develop/codingstyle.rst @@ -110,8 +110,9 @@ Include files You should follow this ordering in U-Boot. In all cases, they should be listed in alphabetical order. First comes headers which are located directly in our -top-level include diretory. Second are headers within subdirectories, Finally -directory-local includes should be listed. See this example: +top-level include diretory. This excludes the common.h header file which is to +be removed. Second are headers within subdirectories, Finally directory-local +includes should be listed. See this example: .. code-block:: C @@ -128,6 +129,9 @@ For files that need to be compiled for the host (e.g. tools), you need to use ``#ifndef USE_HOSTCC`` to avoid including U-Boot specific include files. See common/image.c for an example. +If you encounter code which still uses <common.h> a patch to remove that and +replace it with any required include files directly is much appreciated. + If your file uses driver model, include <dm.h> in the C file. Do not include dm.h in a header file. Try to use forward declarations (e.g. ``struct udevice``) instead. |