diff options
| author | Tom Rini <[email protected]> | 2024-05-07 08:01:06 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-05-07 08:01:06 -0600 |
| commit | 7e2938beabac24e6c8baad33e254b2383dbe9490 (patch) | |
| tree | dbefd5a48f5b034108c6b5b7c2138430539622b2 /doc/develop | |
| parent | 52835266d3e933656a217233eaf672dd9ccd7352 (diff) | |
| parent | 47558a4fce629390133bc6f410a942f109165efd (diff) | |
Merge branch '2024-05-06-remove-include-common_h' into next
- Merge the four series that I made to finally remove include/common.h.
For the most part, this is just removing <common.h> entirely. In a few
cases we needed to add <linux/types.h> or <time.h>. In the case of
PowerPC related code, we instead need to bring in <asm/ppc.h>.
Diffstat (limited to 'doc/develop')
| -rw-r--r-- | doc/develop/codingstyle.rst | 8 | ||||
| -rw-r--r-- | doc/develop/tests_writing.rst | 1 |
2 files changed, 2 insertions, 7 deletions
diff --git a/doc/develop/codingstyle.rst b/doc/develop/codingstyle.rst index f6248cdcb1e..fa3cd6aec82 100644 --- a/doc/develop/codingstyle.rst +++ b/doc/develop/codingstyle.rst @@ -110,9 +110,8 @@ 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. 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: +top-level include diretory. Second are headers within subdirectories, Finally +directory-local includes should be listed. See this example: .. code-block:: C @@ -129,9 +128,6 @@ 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. diff --git a/doc/develop/tests_writing.rst b/doc/develop/tests_writing.rst index bb1145da268..44b544fa78b 100644 --- a/doc/develop/tests_writing.rst +++ b/doc/develop/tests_writing.rst @@ -281,7 +281,6 @@ new one of those, you should add a new suite. Create a new file in test/ or a subdirectory and define a macro to register the suite. For example:: - #include <common.h> #include <console.h> #include <mapmem.h> #include <dm/test.h> |
