Skip to contentSkip to conversation

riscv: mm: Drop redundant _sdata and _edata declaration

PATCH In review Kefeng Wang 2 participants 2 messages May 14, 2021 – May 24, 2021 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 riscv: mm: Drop redundant _sdata and _edata declaration

The _sdata/_edata is already in sections.h, drop redundant declaration.

Also move _xiprom/_exiprom declarations at the beginning of the file, cleanup one CONFIG_XIP_KERNEL.

---
 arch/riscv/mm/init.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
arch/riscv/mm/init.c +1 -7
index 4faf8bd157ea..3396e9f1b8e8 100644
@@ -33,6 +33,7 @@ unsigned long kernel_virt_addr = KERNEL_LINK_ADDR;
 EXPORT_SYMBOL(kernel_virt_addr);
 #ifdef CONFIG_XIP_KERNEL
 #define kernel_virt_addr       (*((unsigned long *)XIP_FIXUP(&kernel_virt_addr)))
+extern char _xiprom[], _exiprom[];
 #endif
 
 unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]
@@ -176,13 +177,6 @@ void __init setup_bootmem(void)
 	memblock_allow_resize();
 }
 
-#ifdef CONFIG_XIP_KERNEL
-
-extern char _xiprom[], _exiprom[];
-extern char _sdata[], _edata[];
-
-#endif /* CONFIG_XIP_KERNEL */
-
 #ifdef CONFIG_MMU
 static struct pt_alloc_ops _pt_ops __ro_after_init;
 
Signature · 7 lines
2.26.2


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
maintainer
#1 lore raw
Quoted 26 lines · On Fri, 14 May 2021 02:49:08 PDT (-0700), [email protected] wrote:

The _sdata/_edata is already in sections.h, drop redundant declaration.

Also move _xiprom/_exiprom declarations at the beginning of the file, cleanup one CONFIG_XIP_KERNEL.

---
 arch/riscv/mm/init.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
arch/riscv/mm/init.c +1 -0
index 4faf8bd157ea..3396e9f1b8e8 100644
@@ -33,6 +33,7 @@ unsigned long kernel_virt_addr = KERNEL_LINK_ADDR;
 EXPORT_SYMBOL(kernel_virt_addr);
 #ifdef CONFIG_XIP_KERNEL
 #define kernel_virt_addr       (*((unsigned long *)XIP_FIXUP(&kernel_virt_addr)))
+extern char _xiprom[], _exiprom[];
 #endif
 
 unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]
@@ -176,13 +177,6 @@ void __init setup_bootmem(void)
 	memblock_allow_resize();
 }

arch/riscv/mm/init.c void __init setup_bootmem(void) · line 181

Quoted 10 lines
arch/riscv/mm/init.c +0 -7
 
-#ifdef CONFIG_XIP_KERNEL
-
-extern char _xiprom[], _exiprom[];
-extern char _sdata[], _edata[];
-
-#endif /* CONFIG_XIP_KERNEL */
-
 #ifdef CONFIG_MMU
 static struct pt_alloc_ops _pt_ops __ro_after_init;

Thanks, this is on for-next.

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