2018-11-08 19:07:44

by David Abdurachmanov

[permalink] [raw]
Subject: [PATCH] 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

Signed-off-by: David Abdurachmanov <[email protected]>
---
arch/riscv/include/asm/module.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/riscv/include/asm/module.h b/arch/riscv/include/asm/module.h
index 349df33808c4..cd2af4b013e3 100644
--- a/arch/riscv/include/asm/module.h
+++ b/arch/riscv/include/asm/module.h
@@ -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);

--
2.19.1



2018-11-08 19:33:35

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: [PATCH] riscv: fix warning in arch/riscv/include/asm/module.h

On Thu, 08 Nov 2018 11:07:00 PST (-0800), [email protected] wrote:
> Fixes warning: 'struct module' declared inside parameter list will not be
> visible outside of this definition or declaration
>
> Signed-off-by: David Abdurachmanov <[email protected]>
> ---
> arch/riscv/include/asm/module.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/riscv/include/asm/module.h b/arch/riscv/include/asm/module.h
> index 349df33808c4..cd2af4b013e3 100644
> --- a/arch/riscv/include/asm/module.h
> +++ b/arch/riscv/include/asm/module.h
> @@ -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!

2018-11-17 03:10:45

by Olof Johansson

[permalink] [raw]
Subject: Re: [PATCH] riscv: fix warning in arch/riscv/include/asm/module.h

On Thu, Nov 8, 2018 at 11:32 AM Palmer Dabbelt <[email protected]> wrote:
>
> On Thu, 08 Nov 2018 11:07:00 PST (-0800), [email protected] wrote:
> > Fixes warning: 'struct module' declared inside parameter list will not be
> > visible outside of this definition or declaration
> >
> > Signed-off-by: David Abdurachmanov <[email protected]>
> > ---
> > arch/riscv/include/asm/module.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/riscv/include/asm/module.h b/arch/riscv/include/asm/module.h
> > index 349df33808c4..cd2af4b013e3 100644
> > --- a/arch/riscv/include/asm/module.h
> > +++ b/arch/riscv/include/asm/module.h
> > @@ -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.

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

Acked-by: Olof Johansson <[email protected]>

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


-Olof

2018-11-19 17:37:43

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: [PATCH] riscv: fix warning in arch/riscv/include/asm/module.h

On Fri, 16 Nov 2018 19:09:36 PST (-0800), Olof Johansson wrote:
> On Thu, Nov 8, 2018 at 11:32 AM Palmer Dabbelt <[email protected]> wrote:
>>
>> On Thu, 08 Nov 2018 11:07:00 PST (-0800), [email protected] wrote:
>> > Fixes warning: 'struct module' declared inside parameter list will not be
>> > visible outside of this definition or declaration
>> >
>> > Signed-off-by: David Abdurachmanov <[email protected]>
>> > ---
>> > arch/riscv/include/asm/module.h | 1 +
>> > 1 file changed, 1 insertion(+)
>> >
>> > diff --git a/arch/riscv/include/asm/module.h b/arch/riscv/include/asm/module.h
>> > index 349df33808c4..cd2af4b013e3 100644
>> > --- a/arch/riscv/include/asm/module.h
>> > +++ b/arch/riscv/include/asm/module.h
>> > @@ -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.
>
> Looks like it's still here in -next. So, patch:
>
> Acked-by: Olof Johansson <[email protected]>
>
> (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...