lkml.org 
[lkml]   [2019]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/8] riscv: add prototypes for assembly language functions from entry.S
On Fri, Oct 18, 2019 at 01:08:34AM -0700, Paul Walmsley wrote:
> Add prototypes for assembly language functions defined in entry.S,
> and include these prototypes into C source files that call those
> functions.
>
> This patch resolves the following warnings from sparse:
>
> arch/riscv/kernel/signal.c:32:53: warning: incorrect type in initializer (different address spaces)

I don't see how adding prototypes will fix an address space warning.

> +asmlinkage void do_trap_unknown(struct pt_regs *regs);
> +asmlinkage void do_trap_insn_misaligned(struct pt_regs *regs);
> +asmlinkage void do_trap_insn_fault(struct pt_regs *regs);
> +asmlinkage void do_trap_insn_illegal(struct pt_regs *regs);
> +asmlinkage void do_trap_load_misaligned(struct pt_regs *regs);
> +asmlinkage void do_trap_load_fault(struct pt_regs *regs);
> +asmlinkage void do_trap_store_misaligned(struct pt_regs *regs);
> +asmlinkage void do_trap_store_fault(struct pt_regs *regs);
> +asmlinkage void do_trap_ecall_u(struct pt_regs *regs);
> +asmlinkage void do_trap_ecall_s(struct pt_regs *regs);
> +asmlinkage void do_trap_ecall_m(struct pt_regs *regs);
> +asmlinkage void do_trap_break(struct pt_regs *regs);

All these are not defined in entry.S, but called from entry.S.

And as Luc pointed out last time the easiest way to fix the sparse
warnings is to add __visible to the definitions of those functions.

\
 
 \ /
  Last update: 2019-10-18 17:50    [W:0.188 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site