From patchwork Wed May 6 18:18:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 6351981 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 76D389F373 for ; Wed, 6 May 2015 18:24:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D7D620320 for ; Wed, 6 May 2015 18:24:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77128202F8 for ; Wed, 6 May 2015 18:24:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751303AbbEFSYF (ORCPT ); Wed, 6 May 2015 14:24:05 -0400 Received: from mail.kernel.org ([198.145.29.136]:52640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbbEFSYC (ORCPT ); Wed, 6 May 2015 14:24:02 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E61222034B; Wed, 6 May 2015 18:24:00 +0000 (UTC) Received: from gandalf.local.home (cpe-67-246-153-56.stny.res.rr.com [67.246.153.56]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F92720320; Wed, 6 May 2015 18:24:00 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.84) (envelope-from ) id 1Yq3zD-0006Ov-3p; Wed, 06 May 2015 14:23:59 -0400 Message-Id: <20150506182359.053170180@goodmis.org> User-Agent: quilt/0.61-1 Date: Wed, 06 May 2015 14:18:32 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Cc: Linus Torvalds , Andrew Morton , Al Viro , Borislav Petkov , Christian Borntraeger , Martin Schwidefsky , Heiko Carstens , Sergei Trofimovich Subject: [RFC][PATCH 1/2] syscalls.h: Make SyS_foo() declaration static References: <20150506181831.145849116@goodmis.org> MIME-Version: 1.0 Content-Disposition: inline; filename=0001-syscalls.h-Make-SyS_foo-declaration-static.patch X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Steven Rostedt (Red Hat)" Nothing should call the syscall wrapper alias (SyS_foo) directly. It is only used to force the system call to sign extend its arguments. See commit 1a94bc34768e "System call wrapper infrastructure". By declaring it static, we can also remove the protoype that was added by commit f9597f24c089 "syscalls.h: add forward declarations for inplace syscall wrappers", that fixed the warnings that were generated because the call was not static. Cc: Christian Borntraeger Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Sergei Trofimovich Cc: Al Viro Signed-off-by: Steven Rostedt --- include/linux/syscalls.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 76d1e38aabe1..f8e5b696670c 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -195,8 +195,7 @@ extern struct trace_event_functions exit_syscall_print_funcs; asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ __attribute__((alias(__stringify(SyS##name)))); \ static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ - asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ - asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ + asmlinkage static long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ { \ long ret = SYSC##name(__MAP(x,__SC_CAST,__VA_ARGS__)); \ __MAP(x,__SC_TEST,__VA_ARGS__); \