[PATCH 3/7] arc: Remove common.h usage

Tom Rini trini at konsulko.com
Fri Oct 13 01:03:55 CEST 2023


We can remove common.h from most cases of the code here, and only a few
places need an additional header instead.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
Cc: Alexey Brodkin <alexey.brodkin at synopsys.com>
Cc: Eugeniy Paltsev <Eugeniy.Paltsev at synopsys.com>
Cc: uboot-snps-arc at synopsys.com
---
 arch/arc/lib/bootm.c                   | 1 -
 arch/arc/lib/cache.c                   | 1 -
 arch/arc/lib/cpu.c                     | 1 -
 arch/arc/lib/init_helpers.c            | 1 -
 arch/arc/lib/interrupts.c              | 2 +-
 arch/arc/lib/relocate.c                | 1 -
 arch/arc/lib/reset.c                   | 1 -
 board/abilis/tb100/tb100.c             | 1 -
 board/synopsys/axs10x/axs10x.c         | 1 -
 board/synopsys/emsdp/emsdp.c           | 1 -
 board/synopsys/hsdk/clk-lib.h          | 1 -
 board/synopsys/hsdk/env-lib.c          | 2 ++
 board/synopsys/hsdk/env-lib.h          | 1 -
 board/synopsys/hsdk/hsdk.c             | 1 -
 board/synopsys/iot_devkit/iot_devkit.c | 1 -
 board/synopsys/nsim/nsim.c             | 1 -
 16 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c
index 2dd003445f8f..44ec5864a1c6 100644
--- a/arch/arc/lib/bootm.c
+++ b/arch/arc/lib/bootm.c
@@ -3,7 +3,6 @@
  * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
  */
 
-#include <common.h>
 #include <bootstage.h>
 #include <env.h>
 #include <image.h>
diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c
index d97a5787424e..22e748868a74 100644
--- a/arch/arc/lib/cache.c
+++ b/arch/arc/lib/cache.c
@@ -4,7 +4,6 @@
  */
 
 #include <config.h>
-#include <common.h>
 #include <cpu_func.h>
 #include <asm/global_data.h>
 #include <linux/bitops.h>
diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c
index 156785796183..803dfd425580 100644
--- a/arch/arc/lib/cpu.c
+++ b/arch/arc/lib/cpu.c
@@ -3,7 +3,6 @@
  * Copyright (C) 2013-2014, 2018 Synopsys, Inc. All rights reserved.
  */
 
-#include <common.h>
 #include <clock_legacy.h>
 #include <init.h>
 #include <malloc.h>
diff --git a/arch/arc/lib/init_helpers.c b/arch/arc/lib/init_helpers.c
index 023eae190759..858b388cc0b9 100644
--- a/arch/arc/lib/init_helpers.c
+++ b/arch/arc/lib/init_helpers.c
@@ -5,7 +5,6 @@
 
 #include <init.h>
 #include <asm/cache.h>
-#include <common.h>
 
 int init_cache_f_r(void)
 {
diff --git a/arch/arc/lib/interrupts.c b/arch/arc/lib/interrupts.c
index db21fbb11428..523b44cb95a4 100644
--- a/arch/arc/lib/interrupts.c
+++ b/arch/arc/lib/interrupts.c
@@ -3,8 +3,8 @@
  * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
  */
 
-#include <common.h>
 #include <irq_func.h>
+#include <vsprintf.h>
 #include <asm/arcregs.h>
 #include <asm/ptrace.h>
 
diff --git a/arch/arc/lib/relocate.c b/arch/arc/lib/relocate.c
index fd6f4fbc9304..95b6d5150c78 100644
--- a/arch/arc/lib/relocate.c
+++ b/arch/arc/lib/relocate.c
@@ -3,7 +3,6 @@
  * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
  */
 
-#include <common.h>
 #include <elf.h>
 #include <log.h>
 #include <asm/sections.h>
diff --git a/arch/arc/lib/reset.c b/arch/arc/lib/reset.c
index b8589d0f0a47..fa60fa963381 100644
--- a/arch/arc/lib/reset.c
+++ b/arch/arc/lib/reset.c
@@ -4,7 +4,6 @@
  */
 
 #include <command.h>
-#include <common.h>
 #include <cpu_func.h>
 
 __weak void reset_cpu(void)
diff --git a/board/abilis/tb100/tb100.c b/board/abilis/tb100/tb100.c
index 89e73225a7df..3dc9e14ef8c0 100644
--- a/board/abilis/tb100/tb100.c
+++ b/board/abilis/tb100/tb100.c
@@ -3,7 +3,6 @@
  * (C) Copyright 2014 Pierrick Hascoet, Abilis Systems
  */
 
-#include <common.h>
 #include <cpu_func.h>
 #include <net.h>
 #include <netdev.h>
diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c
index 75e4d037623e..95297a18357f 100644
--- a/board/synopsys/axs10x/axs10x.c
+++ b/board/synopsys/axs10x/axs10x.c
@@ -3,7 +3,6 @@
  * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
  */
 
-#include <common.h>
 #include <cpu_func.h>
 #include <dwmmc.h>
 #include <init.h>
diff --git a/board/synopsys/emsdp/emsdp.c b/board/synopsys/emsdp/emsdp.c
index a3cee23411d0..adec7d321994 100644
--- a/board/synopsys/emsdp/emsdp.c
+++ b/board/synopsys/emsdp/emsdp.c
@@ -3,7 +3,6 @@
  * Copyright (C) 2018 Synopsys, Inc. All rights reserved.
  */
 
-#include <common.h>
 #include <command.h>
 #include <cpu_func.h>
 #include <dwmmc.h>
diff --git a/board/synopsys/hsdk/clk-lib.h b/board/synopsys/hsdk/clk-lib.h
index 970bcd4a17e7..e1140a10b23a 100644
--- a/board/synopsys/hsdk/clk-lib.h
+++ b/board/synopsys/hsdk/clk-lib.h
@@ -7,7 +7,6 @@
 #ifndef __BOARD_CLK_LIB_H
 #define __BOARD_CLK_LIB_H
 
-#include <common.h>
 #include <linux/bitops.h>
 
 enum clk_ctl_ops {
diff --git a/board/synopsys/hsdk/env-lib.c b/board/synopsys/hsdk/env-lib.c
index d85e8167332f..85a2249f17f2 100644
--- a/board/synopsys/hsdk/env-lib.c
+++ b/board/synopsys/hsdk/env-lib.c
@@ -7,6 +7,8 @@
 #include "env-lib.h"
 #include <env.h>
 #include <log.h>
+#include <vsprintf.h>
+#include <linux/errno.h>
 #include <linux/printk.h>
 
 #define MAX_CMD_LEN	25
diff --git a/board/synopsys/hsdk/env-lib.h b/board/synopsys/hsdk/env-lib.h
index 48c17c4d4f62..cabca1d0f3d3 100644
--- a/board/synopsys/hsdk/env-lib.h
+++ b/board/synopsys/hsdk/env-lib.h
@@ -7,7 +7,6 @@
 #ifndef __BOARD_ENV_LIB_H
 #define __BOARD_ENV_LIB_H
 
-#include <common.h>
 #include <config.h>
 #include <linux/kernel.h>
 
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index 6cbc89ae7874..8eb10f2226fc 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -4,7 +4,6 @@
  * Author: Eugeniy Paltsev <Eugeniy.Paltsev at synopsys.com>
  */
 
-#include <common.h>
 #include <command.h>
 #include <config.h>
 #include <cpu_func.h>
diff --git a/board/synopsys/iot_devkit/iot_devkit.c b/board/synopsys/iot_devkit/iot_devkit.c
index 650958f94c26..dec49e3ce5d6 100644
--- a/board/synopsys/iot_devkit/iot_devkit.c
+++ b/board/synopsys/iot_devkit/iot_devkit.c
@@ -3,7 +3,6 @@
  * Copyright (C) 2018 Synopsys, Inc. All rights reserved.
  */
 
-#include <common.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <malloc.h>
diff --git a/board/synopsys/nsim/nsim.c b/board/synopsys/nsim/nsim.c
index 00e5cc36414b..5953b365fd20 100644
--- a/board/synopsys/nsim/nsim.c
+++ b/board/synopsys/nsim/nsim.c
@@ -3,7 +3,6 @@
  * Copyright (C) 2020 Synopsys, Inc. All rights reserved.
  */
 
-#include <common.h>
 #include <init.h>
 #include <dm/device.h>
 #include <virtio_types.h>
-- 
2.34.1



More information about the U-Boot mailing list