linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Walmsley <paul.walmsley@sifive.com>
To: linux-riscv@lists.infradead.org
Cc: linux-kernel@vger.kernel.org,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH v3 8/8] riscv: for C functions called only from assembly, mark with __visible
Date: Fri, 18 Oct 2019 01:08:41 -0700	[thread overview]
Message-ID: <20191018080841.26712-9-paul.walmsley@sifive.com> (raw)
In-Reply-To: <20191018080841.26712-1-paul.walmsley@sifive.com>

Rather than adding prototypes for C functions called only by assembly
code, mark them as __visible.  This avoids adding prototypes that will
never be used by the callers.  Resolves the following sparse warnings:

arch/riscv/kernel/ptrace.c:151:6: warning: symbol 'do_syscall_trace_enter' was not declared. Should it be static?
arch/riscv/kernel/ptrace.c:175:6: warning: symbol 'do_syscall_trace_exit' was not declared. Should it be static?

Based on a suggestion from Luc Van Oostenryck.

Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 arch/riscv/kernel/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
index 63e47c9f85f0..0f84628b9385 100644
--- a/arch/riscv/kernel/ptrace.c
+++ b/arch/riscv/kernel/ptrace.c
@@ -148,7 +148,7 @@ long arch_ptrace(struct task_struct *child, long request,
  * Allows PTRACE_SYSCALL to work.  These are called from entry.S in
  * {handle,ret_from}_syscall.
  */
-void do_syscall_trace_enter(struct pt_regs *regs)
+__visible void do_syscall_trace_enter(struct pt_regs *regs)
 {
 	if (test_thread_flag(TIF_SYSCALL_TRACE))
 		if (tracehook_report_syscall_entry(regs))
@@ -172,7 +172,7 @@ void do_syscall_trace_enter(struct pt_regs *regs)
 	audit_syscall_entry(regs->a7, regs->a0, regs->a1, regs->a2, regs->a3);
 }
 
-void do_syscall_trace_exit(struct pt_regs *regs)
+__visible void do_syscall_trace_exit(struct pt_regs *regs)
 {
 	audit_syscall_exit(regs);
 
-- 
2.23.0


  parent reply	other threads:[~2019-10-18  8:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18  8:08 [PATCH v3 0/8] riscv: resolve most warnings from sparse Paul Walmsley
2019-10-18  8:08 ` [PATCH v3 1/8] riscv: add prototypes for assembly language functions from entry.S Paul Walmsley
2019-10-18 15:49   ` Christoph Hellwig
2019-10-24 23:59     ` Paul Walmsley
2019-10-18  8:08 ` [PATCH v3 2/8] riscv: add prototypes for assembly language functions from head.S Paul Walmsley
2019-10-18  8:08 ` [PATCH v3 3/8] riscv: init: merge split string literals in preprocessor directive Paul Walmsley
2019-10-18 15:50   ` Christoph Hellwig
2019-10-18  8:08 ` [PATCH v3 4/8] riscv: add missing prototypes Paul Walmsley
2019-10-18 15:54   ` Christoph Hellwig
2019-10-18  8:08 ` [PATCH v3 5/8] riscv: mark some code and data as file-static Paul Walmsley
2019-10-18 15:55   ` Christoph Hellwig
2019-10-23  5:46   ` Greentime Hu
2019-10-23 22:32     ` Paul Walmsley
2019-10-18  8:08 ` [PATCH v3 6/8] riscv: add missing header file includes Paul Walmsley
2019-10-18 15:55   ` Christoph Hellwig
2019-10-18  8:08 ` [PATCH v3 7/8] riscv: fp: add missing __user pointer annotations Paul Walmsley
2019-10-18 15:56   ` Christoph Hellwig
2019-10-18  8:08 ` Paul Walmsley [this message]
2019-10-18 15:56   ` [PATCH v3 8/8] riscv: for C functions called only from assembly, mark with __visible Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191018080841.26712-9-paul.walmsley@sifive.com \
    --to=paul.walmsley@sifive.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=luc.vanoostenryck@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).