Skip to contentSkip to conversation

riscv: remove unneeded #include <asm-generic/export.h>

PATCH In review Masahiro Yamada 2 participants 4 messages Nov 26, 2023 – Nov 28, 2023 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 riscv: remove unneeded #include <asm-generic/export.h>

There is no EXPORT_SYMBOL() line there, hence
"#include <asm-generic/export.h>" is unneeded.

---

 arch/riscv/kernel/mcount-dyn.S | 1 -
 1 file changed, 1 deletion(-)
arch/riscv/kernel/mcount-dyn.S +0 -1
index 58dd96a2a153..952233aa273a 100644
@@ -8,7 +8,6 @@
 #include <asm/unistd.h>
 #include <asm/thread_info.h>
 #include <asm/asm-offsets.h>
-#include <asm-generic/export.h>
 #include <asm/ftrace.h>
 
 	.text
Signature · 1 line
2.40.1
#1 lore raw

PATCH 2/2 riscv: replace <asm-generic/export.h> with <linux/export.h>

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

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

---

 arch/riscv/kernel/mcount.S  | 2 +-
 arch/riscv/lib/clear_page.S | 2 +-
 arch/riscv/lib/tishift.S    | 2 +-
 arch/riscv/lib/uaccess.S    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
arch/riscv/kernel/mcount.S +1 -1
index b4dd9ed6849e..f46db726e42e 100644
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2017 Andes Technology Corporation */
 
+#include <linux/export.h>
 #include <linux/init.h>
 #include <linux/linkage.h>
 #include <linux/cfi_types.h>
@@ -9,7 +10,6 @@
 #include <asm/unistd.h>
 #include <asm/thread_info.h>
 #include <asm/asm-offsets.h>
-#include <asm-generic/export.h>
 #include <asm/ftrace.h>
 
 	.text
arch/riscv/lib/clear_page.S +1 -1
index b22de1231144..fe07ce70a619 100644
@@ -3,10 +3,10 @@
  * Copyright (c) 2023 Ventana Micro Systems Inc.
  */
 
+#include <linux/export.h>
 #include <linux/linkage.h>
 #include <asm/asm.h>
 #include <asm/alternative-macros.h>
-#include <asm-generic/export.h>
 #include <asm/hwcap.h>
 #include <asm/insn-def.h>
 #include <asm/page.h>
arch/riscv/lib/tishift.S +1 -1
index ef90075c4b0a..04f858afafe8 100644
@@ -3,8 +3,8 @@
  * Copyright (C) 2018 Free Software Foundation, Inc.
  */
 
+#include <linux/export.h>
 #include <linux/linkage.h>
-#include <asm-generic/export.h>
 
 SYM_FUNC_START(__lshrti3)
 	beqz	a2, .L1
arch/riscv/lib/uaccess.S +1 -1
index 3ab438f30d13..9eca131dc555 100644
@@ -1,5 +1,5 @@
+#include <linux/export.h>
 #include <linux/linkage.h>
-#include <asm-generic/export.h>
 #include <asm/asm.h>
 #include <asm/asm-extable.h>
 #include <asm/csr.h>
Signature · 1 line
2.40.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] riscv: replace <asm-generic/export.h> with <linux/export.h>

Quoted 7 lines · Masahiro Yamada

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

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

Thanks!
/Emil

Reviewed-by on v1 1/2
#3 lore raw
In reply to Masahiro Yamada
Quoted 4 lines · Masahiro Yamada

There is no EXPORT_SYMBOL() line there, hence
"#include <asm-generic/export.h>" is unneeded.

Thanks!
/Emil

Quoted 25 lines

---

 arch/riscv/kernel/mcount-dyn.S | 1 -
 1 file changed, 1 deletion(-)
arch/riscv/kernel/mcount-dyn.S +0 -2
index 58dd96a2a153..952233aa273a 100644
@@ -8,7 +8,6 @@
 #include <asm/unistd.h>
 #include <asm/thread_info.h>
 #include <asm/asm-offsets.h>
-#include <asm-generic/export.h>
 #include <asm/ftrace.h>
 
 	.text
--

2.40.1

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv