[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191018154923.GA23279@infradead.org>
Date: Fri, 18 Oct 2019 08:49:23 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Paul Walmsley <paul.walmsley@...ive.com>
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [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.
Powered by blists - more mailing lists