From patchwork Thu Nov 9 10:19:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Brodsky X-Patchwork-Id: 13450910 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2399FC4332F for ; Thu, 9 Nov 2023 10:21:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=si4t2Cj+NKi06V8MXs93QNd7oQE0gYwvO4UCB0r2Z6k=; b=4wRoa79KxATVIk t5JXiKKitOgaSX7k6RyE7koN+ejB/0jljuR5tkw52RRAZ4GToWQyl6l7gHZEcZrZIykoxXLbozKUb A2PiN5dQ053s4pswZN3jFixeMd4g3TJqgpXn2ppGZrI+16bHExo85B4TiTUw1L/sl8IDF7Rvn5QFw VBwkZGTXuI7eZNKQCRsqziNJHz5X86n97762Z/JufUsg8oZcxedftfVlv5lcvqWPKKLXFTplAJxf/ MevR6oIHXFy2bcpVJKt6QAAtNLRX7z2xwdK7dId8+QPyaS15iCpSI9lj346pdKVJzQGRMlCQi2rQy 6ki5oEexUOBD2oES/hHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r129j-005vXu-0x; Thu, 09 Nov 2023 10:20:59 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r129f-005vWn-2R for linux-arm-kernel@lists.infradead.org; Thu, 09 Nov 2023 10:20:57 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CDDF312FC; Thu, 9 Nov 2023 02:21:36 -0800 (PST) Received: from e123572-lin.arm.com (e123572-lin.cambridge.arm.com [10.1.194.65]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4FC793F703; Thu, 9 Nov 2023 02:20:51 -0800 (PST) From: Kevin Brodsky To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Catalin Marinas , Arnd Bergmann , Kees Cook , Ard Biesheuvel , Kevin Brodsky Subject: [PATCH] arm64/syscall: Remove duplicate declaration Date: Thu, 9 Nov 2023 10:19:58 +0000 Message-ID: <20231109101958.225593-1-kevin.brodsky@arm.com> X-Mailer: git-send-email 2.42.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231109_022055_859950_9B2B10E7 X-CRM114-Status: GOOD ( 10.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. This likely wouldn't have happened if declarations were consistently located, ideally just before the corresponding definition. Accordingly, this patch removes the old declaration line in __SYSCALL_DEFINEx(), and moves any other declaration that does not directly precede the corresponding definition. Signed-off-by: Kevin Brodsky --- arch/arm64/include/asm/syscall_wrapper.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm64/include/asm/syscall_wrapper.h b/arch/arm64/include/asm/syscall_wrapper.h index 17f687510c48..0d1ec3280f89 100644 --- a/arch/arm64/include/asm/syscall_wrapper.h +++ b/arch/arm64/include/asm/syscall_wrapper.h @@ -18,10 +18,10 @@ #ifdef CONFIG_COMPAT #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ - asmlinkage long __arm64_compat_sys##name(const struct pt_regs *regs); \ ALLOW_ERROR_INJECTION(__arm64_compat_sys##name, ERRNO); \ static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ + asmlinkage long __arm64_compat_sys##name(const struct pt_regs *regs); \ asmlinkage long __arm64_compat_sys##name(const struct pt_regs *regs) \ { \ return __se_compat_sys##name(SC_ARM64_REGS_TO_ARGS(x,__VA_ARGS__)); \ @@ -50,7 +50,6 @@ #endif /* CONFIG_COMPAT */ #define __SYSCALL_DEFINEx(x, name, ...) \ - asmlinkage long __arm64_sys##name(const struct pt_regs *regs); \ 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__)); \ @@ -70,8 +69,8 @@ #define SYSCALL_DEFINE0(sname) \ SYSCALL_METADATA(_##sname, 0); \ - asmlinkage long __arm64_sys_##sname(const struct pt_regs *__unused); \ ALLOW_ERROR_INJECTION(__arm64_sys_##sname, ERRNO); \ + asmlinkage long __arm64_sys_##sname(const struct pt_regs *__unused); \ asmlinkage long __arm64_sys_##sname(const struct pt_regs *__unused) #define COND_SYSCALL(name) \