Skip to contentSkip to conversation

loongarch: remove unneeded #include <asm/export.h>

PATCH In review Masahiro Yamada 2 participants 5 messages Aug 7, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 loongarch: remove unneeded #include <asm/export.h>

There is no EXPORT_SYMBOL line there, hence #include <asm/export.h> is unneeded.

---

 arch/loongarch/kernel/mcount_dyn.S | 1 -
 arch/loongarch/lib/unaligned.S     | 1 -
 arch/loongarch/mm/tlbex.S          | 1 -
 3 files changed, 3 deletions(-)
arch/loongarch/kernel/mcount_dyn.S +0 -1
index e16ab0b98e5a..482aa553aa2d 100644
@@ -3,7 +3,6 @@
  * Copyright (C) 2022 Loongson Technology Corporation Limited
  */
 
-#include <asm/export.h>
 #include <asm/ftrace.h>
 #include <asm/regdef.h>
 #include <asm/stackframe.h>
arch/loongarch/lib/unaligned.S +0 -1
index 9177fd638f07..185f82d85810 100644
@@ -9,7 +9,6 @@
 #include <asm/asmmacro.h>
 #include <asm/asm-extable.h>
 #include <asm/errno.h>
-#include <asm/export.h>
 #include <asm/regdef.h>
 
 .L_fixup_handle_unaligned:
arch/loongarch/mm/tlbex.S +0 -1
index 4ad78703de6f..ca17dd3a1915 100644
@@ -3,7 +3,6 @@
  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  */
 #include <asm/asm.h>
-#include <asm/export.h>
 #include <asm/loongarch.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
Signature · 1 line
2.39.2
#1 lore raw

PATCH 2/3 loongarch: replace #include <asm/export.h> with #include <linux/export.h>

Commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost") deprecated <asm/export.h>, which is now a wrapper of <linux/export.h>.

Replace #include <asm/export.h> with #include <linux/export.h>.

After all the <asm/export.h> lines are converted, <asm/export.h> and <asm-generic/export.h> will be removed.

---

 arch/loongarch/kernel/fpu.S     | 2 +-
 arch/loongarch/kernel/mcount.S  | 2 +-
 arch/loongarch/lib/clear_user.S | 2 +-
 arch/loongarch/lib/copy_user.S  | 2 +-
 arch/loongarch/lib/memcpy.S     | 2 +-
 arch/loongarch/lib/memmove.S    | 2 +-
 arch/loongarch/lib/memset.S     | 2 +-
 arch/loongarch/mm/page.S        | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
arch/loongarch/kernel/fpu.S +1 -1
index 59f1572aa523..b4032deb8e3b 100644
@@ -6,12 +6,12 @@
  *
  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  */
+#include <linux/export.h>
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
 #include <asm/asm-extable.h>
 #include <asm/asm-offsets.h>
 #include <asm/errno.h>
-#include <asm/export.h>
 #include <asm/fpregdef.h>
 #include <asm/loongarch.h>
 #include <asm/regdef.h>
arch/loongarch/kernel/mcount.S +1 -1
index cb8e5803de4b..3015896016a0 100644
@@ -5,7 +5,7 @@
  * Copyright (C) 2022 Loongson Technology Corporation Limited
  */
 
-#include <asm/export.h>
+#include <linux/export.h>
 #include <asm/ftrace.h>
 #include <asm/regdef.h>
 #include <asm/stackframe.h>
arch/loongarch/lib/clear_user.S +1 -1
index 9dcf71719387..0790eadce166 100644
@@ -3,12 +3,12 @@
  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  */
 
+#include <linux/export.h>
 #include <asm/alternative-asm.h>
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
 #include <asm/asm-extable.h>
 #include <asm/cpu.h>
-#include <asm/export.h>
 #include <asm/regdef.h>
 
 .irp to, 0, 1, 2, 3, 4, 5, 6, 7
arch/loongarch/lib/copy_user.S +1 -1
index fecd08cad702..bfe3d2793d00 100644
@@ -3,12 +3,12 @@
  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  */
 
+#include <linux/export.h>
 #include <asm/alternative-asm.h>
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
 #include <asm/asm-extable.h>
 #include <asm/cpu.h>
-#include <asm/export.h>
 #include <asm/regdef.h>
 
 .irp to, 0, 1, 2, 3, 4, 5, 6, 7
arch/loongarch/lib/memcpy.S +1 -1
index f5d4c3e65264..fa1148878d2b 100644
@@ -3,11 +3,11 @@
  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  */
 
+#include <linux/export.h>
 #include <asm/alternative-asm.h>
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
 #include <asm/cpu.h>
-#include <asm/export.h>
 #include <asm/regdef.h>
 
 .section .noinstr.text, "ax"
arch/loongarch/lib/memmove.S +1 -1
index 71b81d271c73..82dae062fec8 100644
@@ -3,11 +3,11 @@
  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  */
 
+#include <linux/export.h>
 #include <asm/alternative-asm.h>
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
 #include <asm/cpu.h>
-#include <asm/export.h>
 #include <asm/regdef.h>
 
 .section .noinstr.text, "ax"
arch/loongarch/lib/memset.S +1 -1
index a45f6f92ee3b..06d3ca54cbfe 100644
@@ -3,11 +3,11 @@
  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  */
 
+#include <linux/export.h>
 #include <asm/alternative-asm.h>
 #include <asm/asm.h>
 #include <asm/asmmacro.h>
 #include <asm/cpu.h>
-#include <asm/export.h>
 #include <asm/regdef.h>
 
 .macro fill_to_64 r0
arch/loongarch/mm/page.S +1 -1
index 4c874a7af0ad..7ad76551d313 100644
@@ -2,9 +2,9 @@
 /*
  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  */
+#include <linux/export.h>
 #include <linux/linkage.h>
 #include <asm/asm.h>
-#include <asm/export.h>
 #include <asm/page.h>
 #include <asm/regdef.h>
 
Signature · 1 line
2.39.2
#2 lore raw

PATCH 3/3 loongarch: remove <asm/export.h>

In reply to Masahiro Yamada

All *.S files under arch/loongarch/ have been converted to include <linux/export.h> instead of <asm/export.h>.

Remove <asm/export.h>.

---

 arch/loongarch/include/asm/Kbuild | 1 -
 1 file changed, 1 deletion(-)
arch/loongarch/include/asm/Kbuild +0 -1
index 6b222f227342..93783fa24f6e 100644
@@ -1,6 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 generic-y += dma-contiguous.h
-generic-y += export.h
 generic-y += mcs_spinlock.h
 generic-y += parport.h
 generic-y += early_ioremap.h
Signature · 1 line
2.39.2
maintainer
#3 lore raw

Re: [PATCH 3/3] loongarch: remove <asm/export.h>

Hi, Masahiro,

Is this series only for linux-next (6.6), or also needed by 6.5?

Huacai

Quoted 26 lines · Masahiro Yamada

All *.S files under arch/loongarch/ have been converted to include <linux/export.h> instead of <asm/export.h>.

Remove <asm/export.h>.

---

 arch/loongarch/include/asm/Kbuild | 1 -
 1 file changed, 1 deletion(-)
arch/loongarch/include/asm/Kbuild +0 -2
index 6b222f227342..93783fa24f6e 100644
@@ -1,6 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 generic-y += dma-contiguous.h
-generic-y += export.h
 generic-y += mcs_spinlock.h
 generic-y += parport.h
 generic-y += early_ioremap.h
--

2.39.2

#4 lore raw

Re: [PATCH 3/3] loongarch: remove <asm/export.h>

Quoted 4 lines · Huacai Chen

Hi, Masahiro,

Is this series only for linux-next (6.6), or also needed by 6.5?

I meant it for linux-next (6.6).

Code clean-up can wait for the next MW.

Signature · 2 lines
Best Regards
Masahiro Yamada