Skip to contentSkip to conversation

riscv: fix warning in arch/riscv/include/asm/module.h

PATCH In review David Abdurachmanov 3 participants 4 messages Nov 8, 2018 – Nov 19, 2018 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: fix warning in arch/riscv/include/asm/module.h

Fixes warning: 'struct module' declared inside parameter list will not be visible outside of this definition or declaration

---
 arch/riscv/include/asm/module.h | 1 +
 1 file changed, 1 insertion(+)
arch/riscv/include/asm/module.h +1 -0
index 349df33808c4..cd2af4b013e3 100644
@@ -8,6 +8,7 @@
 
 #define MODULE_ARCH_VERMAGIC    "riscv"
 
+struct module;
 u64 module_emit_got_entry(struct module *mod, u64 val);
 u64 module_emit_plt_entry(struct module *mod, u64 val);
 
Signature · 1 line
2.19.1
#1 lore raw
Quoted 13 lines · david.abdurachmanov at gmail.com

Fixes warning: 'struct module' declared inside parameter list will not be visible outside of this definition or declaration

---
 arch/riscv/include/asm/module.h | 1 +
 1 file changed, 1 insertion(+)
arch/riscv/include/asm/module.h +0 -0
index 349df33808c4..cd2af4b013e3 100644

arch/riscv/include/asm/module.h line 13

Quoted 6 lines
arch/riscv/include/asm/module.h +1 -0
@@ -8,6 +8,7 @@
 
 #define MODULE_ARCH_VERMAGIC    "riscv"
 
+struct module;
 u64 module_emit_got_entry(struct module *mod, u64 val);
 u64 module_emit_plt_entry(struct module *mod, u64 val);

Works for me. Looks like arm64 might have exactly the same issue. I'll roll it up into the next RC.

Thanks!

#2 lore raw
Quoted 16 lines · Palmer Dabbelt
Quoted 14 lines · david.abdurachmanov at gmail.com

Fixes warning: 'struct module' declared inside parameter list will not be visible outside of this definition or declaration

---
 arch/riscv/include/asm/module.h | 1 +
 1 file changed, 1 insertion(+)
arch/riscv/include/asm/module.h +0 -0
index 349df33808c4..cd2af4b013e3 100644
@@ -8,6 +8,7 @@
 
Quoted 8 lines

arch/riscv/include/asm/module.h line 13

Quoted 5 lines
arch/riscv/include/asm/module.h +1 -0
 #define MODULE_ARCH_VERMAGIC    "riscv"
 
+struct module;
 u64 module_emit_got_entry(struct module *mod, u64 val);
 u64 module_emit_plt_entry(struct module *mod, u64 val);

Works for me. Looks like arm64 might have exactly the same issue. I'll roll it up into the next RC.

Looks like it's still here in -next. So, patch:

(and it'd be great to pickup together with the 32-bit build fix).

-Olof

#3 lore raw
Quoted 26 lines · Olof Johansson
Quoted 16 lines · Palmer Dabbelt
Quoted 14 lines · david.abdurachmanov at gmail.com

Fixes warning: 'struct module' declared inside parameter list will not be visible outside of this definition or declaration

---
 arch/riscv/include/asm/module.h | 1 +
 1 file changed, 1 insertion(+)
arch/riscv/include/asm/module.h +0 -0
index 349df33808c4..cd2af4b013e3 100644
@@ -8,6 +8,7 @@
 
Quoted 8 lines

arch/riscv/include/asm/module.h line 13

Quoted 5 lines
arch/riscv/include/asm/module.h +1 -0
 #define MODULE_ARCH_VERMAGIC    "riscv"
 
+struct module;
 u64 module_emit_got_entry(struct module *mod, u64 val);
 u64 module_emit_plt_entry(struct module *mod, u64 val);

Works for me. Looks like arm64 might have exactly the same issue. I'll roll it up into the next RC.

Quoted 5 lines

Looks like it's still here in -next. So, patch:

(and it'd be great to pickup together with the 32-bit build fix).

Sorry, I must have managed to screw something up here and drop both of these from my fixes list. Not sure how they managed to make it into -next without being in the list, but it's been on my TODO list to fix up my workflow scripts for a while anyway...