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: 163335 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp338233vqs; Thu, 9 Nov 2023 02:21:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IHEr9l4hJmhhTCZYrNZZ+WqUzATd/Mo1JqUyib7qJNIQ1GEXXm3wOXTnVauw9G98sKQx81N X-Received: by 2002:a17:902:e743:b0:1cc:6078:52ff with SMTP id p3-20020a170902e74300b001cc607852ffmr7097037plf.26.1699525271634; Thu, 09 Nov 2023 02:21:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699525271; cv=none; d=google.com; s=arc-20160816; b=caJCsJ9uLmgQWXVVEhCmoOg8bN3J2HiqIQVfiCisVj2oTHq7aSw9EzFetbMcNh/5gL Y4iAhxx9IDoiCA3/9Kr/F9MXU4/mongpCyErpOuRz5qwR+HEVx4Tgmnoj3b+cdQb0yRy FAGXFBdgTJ1E10qdYhzpsUgWdrx7dvrYXiyF91HkxAgvMZJrT+FAHcn9KSN0NQo9qMZV 3GaT27VElhsR3WocE1eOrQqPwWj1PmCG5tqdFzvepM/f0W7tUNfA/zFVrU8AkaxZwVnb GxpPxtcb04c+h4sH9vMAwmOW2M9i22zbmvWUJyRLomUeMpAWhzmyveHOkU1wNW9ewswe QPAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=XfnrZG3DdsSTsqxPnrwm1U34LTpAATFcNn7ubZSYxOA=; fh=MASCYBA8Uy4n7dQedD3Iq5CUx9XJNihlWbz/p0hJpaw=; b=oI+KfyQkmPYv98FZyJvCE7AqtHSrWrs3UZFupTOd5FvX/q+qcryStz8q8lW8l9WZlm hM8/1Yfrs//Z9XbsNdquaV2aghoOrqaA4SqELy/vxCYDHb6cTzZx7FW9uISyjQwZO0T4 RKctA8ue0VZO6RRg9RohAvMEc3XBuudoHl5topGJyn5tPlqaMVkklMjtY4dFDcO6CLcN I/McRm3+UBhh+WBqyUtysLejl4NKHq8P+yepcPqEl4CqeIOrfWriJW/QMF4MwEfvzStt 1n9Ultc5lTyWTBxQQTRweW6TB+wMJU55+DFS6ggXHrndKQFDdArokuvZPWuN+g3d6Ma/ vKwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id li16-20020a170903295000b001cc76bea519si4207996plb.87.2023.11.09.02.21.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 02:21:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 34B4C8220D6D; Thu, 9 Nov 2023 02:21:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231821AbjKIKU4 (ORCPT + 32 others); Thu, 9 Nov 2023 05:20:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230055AbjKIKUz (ORCPT ); Thu, 9 Nov 2023 05:20:55 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 89C8A19A3 for ; Thu, 9 Nov 2023 02:20:52 -0800 (PST) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 09 Nov 2023 02:21:09 -0800 (PST) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782081411158577552 X-GMAIL-MSGID: 1782081411158577552 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) \