From: "tip-bot2 for Masahiro Yamada" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
mic@linux.microsoft.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: [tip: x86/cleanups] x86/syscalls: Fix -Wmissing-prototypes warnings from COND_SYSCALL()
Date: Thu, 25 Mar 2021 15:27:09 -0000 [thread overview]
Message-ID: <161668602985.398.1651880509532185393.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20210301131533.64671-2-masahiroy@kernel.org>
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 7dfe553affd0d003c7535b7ba60d09193471ea9d
Gitweb: https://git.kernel.org/tip/7dfe553affd0d003c7535b7ba60d09193471ea9d
Author: Masahiro Yamada <masahiroy@kernel.org>
AuthorDate: Mon, 01 Mar 2021 22:15:26 +09:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Thu, 25 Mar 2021 16:20:41 +01:00
x86/syscalls: Fix -Wmissing-prototypes warnings from COND_SYSCALL()
Building kernel/sys_ni.c with W=1 emits tons of -Wmissing-prototypes warnings:
$ make W=1 kernel/sys_ni.o
[ snip ]
CC kernel/sys_ni.o
./arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__ia32_sys_io_setup' [-Wmissing-prototypes]
...
The problem is in __COND_SYSCALL(), the __SYS_STUB0() and __SYS_STUBx() macros
defined a few lines above already have forward declarations.
Let's do likewise for __COND_SYSCALL() to fix the warnings.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Mickaël Salaün <mic@linux.microsoft.com>
Link: https://lore.kernel.org/r/20210301131533.64671-2-masahiroy@kernel.org
---
arch/x86/include/asm/syscall_wrapper.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/include/asm/syscall_wrapper.h b/arch/x86/include/asm/syscall_wrapper.h
index a84333a..80c08c7 100644
--- a/arch/x86/include/asm/syscall_wrapper.h
+++ b/arch/x86/include/asm/syscall_wrapper.h
@@ -80,6 +80,7 @@ extern long __ia32_sys_ni_syscall(const struct pt_regs *regs);
}
#define __COND_SYSCALL(abi, name) \
+ __weak long __##abi##_##name(const struct pt_regs *__unused); \
__weak long __##abi##_##name(const struct pt_regs *__unused) \
{ \
return sys_ni_syscall(); \
next prev parent reply other threads:[~2021-03-25 15:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 13:15 [PATCH 0/7] x86: fix warnings and refactor syscall code Masahiro Yamada
2021-03-01 13:15 ` [PATCH 1/7] x86/syscalls: fix -Wmissing-prototypes warnings from COND_SYSCALL() Masahiro Yamada
2021-03-25 11:48 ` Mickaël Salaün
2021-03-25 14:31 ` Masahiro Yamada
2021-04-09 4:48 ` Masahiro Yamada
2021-03-25 15:27 ` tip-bot2 for Masahiro Yamada [this message]
2021-03-01 13:15 ` [PATCH 2/7] x86/entry/x32: rename __x32_compat_sys_* to __x64_compat_sys_* Masahiro Yamada
2021-03-01 13:15 ` [PATCH 3/7] x86/syscalls: switch to generic syscalltbl.sh Masahiro Yamada
2021-03-01 13:15 ` [PATCH 4/7] x86/syscalls: stop filling syscall arrays with *_sys_ni_syscall Masahiro Yamada
2021-03-01 13:15 ` [PATCH 5/7] x86/unistd: define X32_NR_syscalls only for 64-bit kernel Masahiro Yamada
2021-03-01 13:15 ` [PATCH 6/7] x86/syscalls: use __NR_syscalls instead of __NR_syscall_max Masahiro Yamada
2021-03-01 13:15 ` [PATCH 7/7] x86/syscalls: switch to generic syscallhdr.sh Masahiro Yamada
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=161668602985.398.1651880509532185393.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mic@linux.microsoft.com \
--cc=mingo@kernel.org \
--cc=x86@kernel.org \
/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).