U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH 81/81] common.h: Remove this file and all references
Date: Wed,  1 May 2024 19:31:38 -0600	[thread overview]
Message-ID: <20240502013138.2383421-81-trini@konsulko.com> (raw)
In-Reply-To: <20240502013138.2383421-1-trini@konsulko.com>

With all files that had included this file directly having been updated,
we can now remove this file.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 doc/develop/codingstyle.rst           |  8 ++-----
 doc/develop/tests_writing.rst         |  1 -
 include/common.h                      | 33 ---------------------------
 scripts/Makefile.autoconf             |  4 ++--
 scripts/gen_ll_addressable_symbols.sh |  2 +-
 tools/dtoc/dtb_platdata.py            |  3 ---
 tools/dtoc/test_dtoc.py               |  3 ---
 7 files changed, 5 insertions(+), 49 deletions(-)
 delete mode 100644 include/common.h

diff --git a/doc/develop/codingstyle.rst b/doc/develop/codingstyle.rst
index f6248cdcb1e1..fa3cd6aec82e 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 bb1145da268b..44b544fa78b4 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>
diff --git a/include/common.h b/include/common.h
deleted file mode 100644
index a79c2bb49931..000000000000
--- a/include/common.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Common header file for U-Boot
- *
- * This file still includes quite a few headers that should be included
- * individually as needed. Patches to remove things are welcome.
- *
- * (C) Copyright 2000-2009
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- */
-
-#ifndef __COMMON_H_
-#define __COMMON_H_	1
-
-#ifndef __ASSEMBLY__		/* put C only stuff in this section */
-#include <config.h>
-#include <errno.h>
-#include <time.h>
-#include <linux/types.h>
-#include <linux/string.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <linux/kernel.h>
-#include <asm/u-boot.h> /* boot information for Linux kernel */
-#include <vsprintf.h>
-#endif	/* __ASSEMBLY__ */
-
-/* Pull in stuff for the build system */
-#ifdef DO_DEPS_ONLY
-# include <env_internal.h>
-#endif
-
-#endif	/* __COMMON_H_ */
diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf
index 8208ffe22744..b42f9b525fea 100644
--- a/scripts/Makefile.autoconf
+++ b/scripts/Makefile.autoconf
@@ -45,7 +45,7 @@ c_flags := $(KBUILD_CFLAGS) $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) \
 
 quiet_cmd_autoconf_dep = GEN     $@
       cmd_autoconf_dep = $(CC) -x c -DDO_DEPS_ONLY -M -MP $(c_flags) \
-	-MQ include/config/auto.conf $(srctree)/include/common.h > $@ || {	\
+	-MQ include/config/auto.conf include/config.h > $@ || {	\
 		rm $@; false;							\
 	}
 include/autoconf.mk.dep: include/config.h FORCE
@@ -70,7 +70,7 @@ quiet_cmd_autoconf = GEN     $@
 
 quiet_cmd_u_boot_cfg = CFG     $@
       cmd_u_boot_cfg = \
-	$(CPP) $(c_flags) $2 -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && { \
+	$(CPP) $(c_flags) $2 -DDO_DEPS_ONLY -dM include/config.h > $@.tmp && { \
 		grep 'define CONFIG_' $@.tmp | \
 			sed '/define CONFIG_IS_ENABLED(/d;/define CONFIG_IF_ENABLED_INT(/d;/define CONFIG_VAL(/d;' > $@; \
 		rm $@.tmp;						\
diff --git a/scripts/gen_ll_addressable_symbols.sh b/scripts/gen_ll_addressable_symbols.sh
index d0864804aafb..13f670ae0ef0 100755
--- a/scripts/gen_ll_addressable_symbols.sh
+++ b/scripts/gen_ll_addressable_symbols.sh
@@ -10,6 +10,6 @@
 
 set -e
 
-echo '#include <common.h>'
+echo '#include <linux/compiler.h>'
 $@ 2>/dev/null | grep -oe '_u_boot_list_2_[a-zA-Z0-9_]*_2_[a-zA-Z0-9_]*' | \
 	sort -u | sed -e 's/^\(.*\)/extern char \1[];\n__ADDRESSABLE(\1);/'
diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
index 39f416cfd806..89066e6403fc 100644
--- a/tools/dtoc/dtb_platdata.py
+++ b/tools/dtoc/dtb_platdata.py
@@ -835,7 +835,6 @@ class DtbPlatdata():
 
     def generate_uclasses(self):
         self.out('\n')
-        self.out('#include <common.h>\n')
         self.out('#include <dm.h>\n')
         self.out('#include <dt-structs.h>\n')
         self.out('\n')
@@ -1059,7 +1058,6 @@ class DtbPlatdata():
         self.out('/* Allow use of U_BOOT_DRVINFO() in this file */\n')
         self.out('#define DT_PLAT_C\n')
         self.out('\n')
-        self.out('#include <common.h>\n')
         self.out('#include <dm.h>\n')
         self.out('#include <dt-structs.h>\n')
         self.out('\n')
@@ -1092,7 +1090,6 @@ class DtbPlatdata():
         See the documentation in doc/driver-model/of-plat.rst for more
         information.
         """
-        self.out('#include <common.h>\n')
         self.out('#include <dm.h>\n')
         self.out('#include <dt-structs.h>\n')
         self.out('\n')
diff --git a/tools/dtoc/test_dtoc.py b/tools/dtoc/test_dtoc.py
index 597c93e8a870..c4a0889aebe7 100755
--- a/tools/dtoc/test_dtoc.py
+++ b/tools/dtoc/test_dtoc.py
@@ -63,7 +63,6 @@ C_HEADER = C_HEADER_PRE + '''
 /* Allow use of U_BOOT_DRVINFO() in this file */
 #define DT_PLAT_C
 
-#include <common.h>
 #include <dm.h>
 #include <dt-structs.h>
 '''
@@ -417,7 +416,6 @@ U_BOOT_DRVINFO(spl_test3) = {
 '''
     uclass_text_inst = '''
 
-#include <common.h>
 #include <dm.h>
 #include <dt-structs.h>
 
@@ -521,7 +519,6 @@ DM_UCLASS_INST(testfdt) = {
  * This was generated by dtoc from a .dtb (device tree binary) file.
  */
 
-#include <common.h>
 #include <dm.h>
 #include <dt-structs.h>
 
-- 
2.34.1


  parent reply	other threads:[~2024-05-02  1:43 UTC|newest]

Thread overview: 136+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240502013146epcas1p3dce70115dbffcbd41eb7f657d6188d2e@epcas1p3.samsung.com>
2024-05-02  1:30 ` [PATCH 01/81] mmc: Migrate MMC_SUPPORTS_TUNING to Kconfig Tom Rini
2024-05-02  1:30   ` [PATCH 02/81] arm: aspeed: Add missing <linux/types.h> Tom Rini
2024-05-02  1:30   ` [PATCH 03/81] arm: sunxi: " Tom Rini
2024-05-02  1:30   ` [PATCH 04/81] arm: nexell: " Tom Rini
2024-05-09  8:54     ` Stefan Bosch
2024-05-02  1:30   ` [PATCH 05/81] arm: socfpga: " Tom Rini
2024-05-02  1:30   ` [PATCH 06/81] x86: " Tom Rini
2024-05-02  1:30   ` [PATCH 07/81] include: " Tom Rini
2024-05-02  1:30   ` [PATCH 08/81] fsl_ifc.h: Add <asm/ppc.h> Tom Rini
2024-05-02  1:30   ` [PATCH 09/81] include/linux/compat.h: Add <time.h> Tom Rini
2024-05-02  1:30   ` [PATCH 10/81] adc: Remove <common.h> and add needed includes Tom Rini
2024-05-02  1:30   ` [PATCH 11/81] ata: " Tom Rini
2024-05-02  3:32     ` Tony Dinh
2024-05-02  1:30   ` [PATCH 12/81] axi: " Tom Rini
2024-05-02  1:30   ` [PATCH 13/81] bios_emulator: " Tom Rini
2024-05-02  1:30   ` [PATCH 14/81] block: " Tom Rini
2024-05-02  7:25     ` Mattijs Korpershoek
2024-05-10  0:40     ` Kever Yang
2024-05-02  1:30   ` [PATCH 15/81] bootcount: " Tom Rini
2024-05-02  1:30   ` [PATCH 16/81] bus: " Tom Rini
2024-05-02  1:30   ` [PATCH 17/81] button: " Tom Rini
2024-05-02  1:30   ` [PATCH 18/81] cache: " Tom Rini
2024-05-02  1:30   ` [PATCH 19/81] clk: " Tom Rini
2024-05-09  9:07     ` Stefan Bosch
2024-05-10  0:40     ` Kever Yang
2024-05-02  1:30   ` [PATCH 20/81] core: " Tom Rini
2024-05-02  1:30   ` [PATCH 21/81] cpu: " Tom Rini
2024-05-02  1:30   ` [PATCH 22/81] crypto: " Tom Rini
2024-05-02  1:30   ` [PATCH 23/81] ddr: " Tom Rini
2024-05-02  1:30   ` [PATCH 24/81] demo: " Tom Rini
2024-05-02  1:30   ` [PATCH 25/81] dfu: " Tom Rini
2024-05-02  7:28     ` Mattijs Korpershoek
2024-05-02 14:45       ` Tom Rini
2024-05-02  1:30   ` [PATCH 26/81] dma: " Tom Rini
2024-05-02  1:30   ` [PATCH 27/81] extcon: " Tom Rini
2024-05-02  1:30   ` [PATCH 28/81] fastboot: " Tom Rini
2024-05-02  7:29     ` Mattijs Korpershoek
2024-05-02  1:30   ` [PATCH 29/81] firmware: " Tom Rini
2024-05-07  7:37     ` Ilias Apalodimas
2024-05-02  1:30   ` [PATCH 30/81] fpga: " Tom Rini
2024-05-02  1:30   ` [PATCH 31/81] fuzz: " Tom Rini
2024-05-02  1:30   ` [PATCH 32/81] fwu-mdata: " Tom Rini
2024-05-02 13:15     ` Jassi Brar
2024-05-07  7:39     ` Ilias Apalodimas
2024-05-02  1:30   ` [PATCH 33/81] gpio: " Tom Rini
2024-05-02 11:10     ` Peter Robinson
2024-05-03  3:58     ` Heiko Schocher
2024-05-09  9:09     ` Stefan Bosch
2024-05-10  0:40     ` Kever Yang
2024-05-02  1:30   ` [PATCH 34/81] hwspinlock: " Tom Rini
2024-05-02  1:30   ` [PATCH 35/81] i2c: " Tom Rini
2024-05-03  3:58     ` Heiko Schocher
2024-05-09  9:09     ` Stefan Bosch
2024-05-02  1:30   ` [PATCH 36/81] input: " Tom Rini
2024-05-02  1:30   ` [PATCH 37/81] iommu: " Tom Rini
2024-05-02  1:30   ` [PATCH 38/81] led: " Tom Rini
2024-05-02  1:30   ` [PATCH 39/81] mailbox: " Tom Rini
2024-05-02  1:30   ` [PATCH 40/81] memory: " Tom Rini
2024-05-02  1:30   ` [PATCH 41/81] misc: " Tom Rini
2024-05-10  0:40     ` Kever Yang
2024-05-02  1:30   ` [PATCH 42/81] mmc: " Tom Rini
2024-05-02 11:10     ` Peter Robinson
2024-05-03  2:31     ` Jaehoon Chung
2024-05-10  0:41     ` Kever Yang
2024-05-02  1:31   ` [PATCH 43/81] mtd: " Tom Rini
2024-05-03  4:21     ` William Zhang
2024-05-02  1:31   ` [PATCH 44/81] mux: " Tom Rini
2024-05-02  1:31   ` [PATCH 45/81] net: " Tom Rini
2024-05-10  0:41     ` Kever Yang
2024-05-02  1:31   ` [PATCH 46/81] nvme: " Tom Rini
2024-05-02  1:31   ` [PATCH 47/81] pch: " Tom Rini
2024-05-02  1:31   ` [PATCH 48/81] pci: " Tom Rini
2024-05-03  3:59     ` Heiko Schocher
2024-05-10  0:42     ` Kever Yang
2024-05-02  1:31   ` [PATCH 49/81] pci_endpoint: " Tom Rini
2024-05-02  1:31   ` [PATCH 50/81] phy: " Tom Rini
2024-05-09  9:10     ` Stefan Bosch
2024-05-10  0:42     ` Kever Yang
2024-05-02  1:31   ` [PATCH 51/81] pinctrl: " Tom Rini
2024-05-02 11:11     ` Peter Robinson
2024-05-09  9:10     ` Stefan Bosch
2024-05-10  0:42     ` Kever Yang
2024-05-02  1:31   ` [PATCH 52/81] power: " Tom Rini
2024-05-10  0:43     ` Kever Yang
2024-05-02  1:31   ` [PATCH 53/81] pwm: " Tom Rini
2024-05-09  9:11     ` Stefan Bosch
2024-05-02  1:31   ` [PATCH 54/81] ram: " Tom Rini
2024-05-10  0:43     ` Kever Yang
2024-05-02  1:31   ` [PATCH 55/81] reboot-mode: " Tom Rini
2024-05-02  1:31   ` [PATCH 56/81] remoteproc: " Tom Rini
2024-05-02  1:31   ` [PATCH 57/81] reset: " Tom Rini
2024-05-10  0:43     ` Kever Yang
2024-05-02  1:31   ` [PATCH 58/81] rtc: " Tom Rini
2024-05-02  1:31   ` [PATCH 59/81] scsi: " Tom Rini
2024-05-02  1:31   ` [PATCH 60/81] serial: " Tom Rini
2024-05-02 11:11     ` Peter Robinson
2024-05-09  9:12     ` Stefan Bosch
2024-05-02  1:31   ` [PATCH 61/81] sm: " Tom Rini
2024-05-02  1:31   ` [PATCH 62/81] smem: " Tom Rini
2024-05-02  1:31   ` [PATCH 63/81] soc: " Tom Rini
2024-05-03 14:44     ` Bryan Brattlof
2024-05-02  1:31   ` [PATCH 64/81] sound: " Tom Rini
2024-05-10  0:44     ` Kever Yang
2024-05-02  1:31   ` [PATCH 65/81] spi: " Tom Rini
2024-05-03  4:25     ` William Zhang
2024-05-03  5:47     ` Cédric Le Goater
2024-05-02  1:31   ` [PATCH 66/81] spmi: " Tom Rini
2024-05-02  1:31   ` [PATCH 67/81] sysinfo: " Tom Rini
2024-05-02  1:31   ` [PATCH 68/81] sysreset: " Tom Rini
2024-05-10  0:44     ` Kever Yang
2024-05-02  1:31   ` [PATCH 69/81] thermal: " Tom Rini
2024-05-02  1:31   ` [PATCH 70/81] timer: " Tom Rini
2024-05-10  0:44     ` Kever Yang
2024-05-02  1:31   ` [PATCH 71/81] tpm: " Tom Rini
2024-05-07  7:36     ` Ilias Apalodimas
2024-05-02  1:31   ` [PATCH 72/81] ufs: " Tom Rini
2024-05-02  1:31   ` [PATCH 73/81] usb: " Tom Rini
2024-05-02  7:40     ` Mattijs Korpershoek
2024-05-02 14:51       ` Tom Rini
2024-05-03  7:20         ` Mattijs Korpershoek
2024-05-04 17:09     ` E Shattow
2024-05-04 18:33       ` Tom Rini
2024-05-02  1:31   ` [PATCH 74/81] video: " Tom Rini
2024-05-02 11:14     ` Peter Robinson
2024-05-09  9:13     ` Stefan Bosch
2024-05-10  0:45     ` Kever Yang
2024-05-02  1:31   ` [PATCH 75/81] virtio: " Tom Rini
2024-05-02  1:31   ` [PATCH 76/81] w1: " Tom Rini
2024-05-02  1:31   ` [PATCH 77/81] w1-eeprom: " Tom Rini
2024-05-02  1:31   ` [PATCH 78/81] watchdog: " Tom Rini
2024-05-02  6:49     ` Angelo Dureghello
2024-05-02  1:31   ` [PATCH 79/81] xen: " Tom Rini
2024-05-02  1:31   ` [PATCH 80/81] api: " Tom Rini
2024-05-02  1:31   ` Tom Rini [this message]
2024-05-03  2:29   ` [PATCH 01/81] mmc: Migrate MMC_SUPPORTS_TUNING to Kconfig Jaehoon Chung
2024-05-07 14:02   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240502013138.2383421-81-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox