[v2] arm64/syscall: Remove duplicate declaration

Message ID 20231109141153.250046-1-kevin.brodsky@arm.com
State New
Headers
Series [v2] arm64/syscall: Remove duplicate declaration |

Commit Message

Kevin Brodsky Nov. 9, 2023, 2:11 p.m. UTC
  Commit 6ac19f96515e ("arm64: avoid prototype warnings for syscalls")
added missing declarations to various syscall wrapper macros. It
however proved a little too zealous in __SYSCALL_DEFINEx(), as a
declaration for __arm64_sys##name was already present. A declaration
is required before the call to ALLOW_ERROR_INJECTION(), so keep
the original one and remove the new one.

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
---

v1..v2:
- Keep the original declarations as-is, as they are required before
  calling ALLOW_ERROR_INJECTION().

 arch/arm64/include/asm/syscall_wrapper.h | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Arnd Bergmann Nov. 9, 2023, 4:16 p.m. UTC | #1
On Thu, Nov 9, 2023, at 15:11, Kevin Brodsky wrote:
> Commit 6ac19f96515e ("arm64: avoid prototype warnings for syscalls")
> added missing declarations to various syscall wrapper macros. It
> however proved a little too zealous in __SYSCALL_DEFINEx(), as a
> declaration for __arm64_sys##name was already present. A declaration
> is required before the call to ALLOW_ERROR_INJECTION(), so keep
> the original one and remove the new one.
>
> Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
> ---

Acked-by: Arnd Bergmann <arnd@arndb.de>
  
Catalin Marinas Nov. 9, 2023, 5:40 p.m. UTC | #2
On Thu, 09 Nov 2023 14:11:53 +0000, Kevin Brodsky wrote:
> Commit 6ac19f96515e ("arm64: avoid prototype warnings for syscalls")
> added missing declarations to various syscall wrapper macros. It
> however proved a little too zealous in __SYSCALL_DEFINEx(), as a
> declaration for __arm64_sys##name was already present. A declaration
> is required before the call to ALLOW_ERROR_INJECTION(), so keep
> the original one and remove the new one.
> 
> [...]

Applied to arm64 (for-next/core), thanks!

[1/1] arm64/syscall: Remove duplicate declaration
      https://git.kernel.org/arm64/c/f86128050d2d
  

Patch

diff --git a/arch/arm64/include/asm/syscall_wrapper.h b/arch/arm64/include/asm/syscall_wrapper.h
index 17f687510c48..d977713ec0ba 100644
--- a/arch/arm64/include/asm/syscall_wrapper.h
+++ b/arch/arm64/include/asm/syscall_wrapper.h
@@ -54,7 +54,6 @@ 
 	ALLOW_ERROR_INJECTION(__arm64_sys##name, ERRNO);			\
 	static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__));		\
 	static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));	\
-	asmlinkage long __arm64_sys##name(const struct pt_regs *regs);		\
 	asmlinkage long __arm64_sys##name(const struct pt_regs *regs)		\
 	{									\
 		return __se_sys##name(SC_ARM64_REGS_TO_ARGS(x,__VA_ARGS__));	\