From patchwork Sat Mar 15 05:39:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 3836341 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9917BBF540 for ; Sat, 15 Mar 2014 05:42:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AFCDF20295 for ; Sat, 15 Mar 2014 05:42:34 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9570120279 for ; Sat, 15 Mar 2014 05:42:33 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOhLO-0001Hf-7W; Sat, 15 Mar 2014 05:41:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOhL4-00081Y-VT; Sat, 15 Mar 2014 05:40:54 +0000 Received: from mail-pd0-f179.google.com ([209.85.192.179]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOhKf-0007wP-Rz for linux-arm-kernel@lists.infradead.org; Sat, 15 Mar 2014 05:40:30 +0000 Received: by mail-pd0-f179.google.com with SMTP id w10so3383308pde.24 for ; Fri, 14 Mar 2014 22:40:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JGNBXzEy0lj6D7Nwvck4du88cfHWzm9XcjuIHmM2sEU=; b=NUI2ZVhwTYrQmuoAQJKcQmkdInXktOCGj3WN7hD0iikw1W3R8jBZqDsqLvwOYdNLY6 grhPbjmmO7Hs2H8ybbMRs3LYzIfw/L2WYwoy5jy72pjkZq2EGaxBq28H5S/Uws9kmrOh IIuz5sfXivTzhUeyC9r1klnKAuuFLz41On1Xujgdir9Q0fiIpE/Qro3sX8NuhXD892UX YTYNMQ8bKNmO9zN6phPmgvkxC/728xN86m089QB/UQtmPnN2ddHp24xuOIWx8mQl7nUU +NwBVr6XWVZpbs0RTFLI1VNHRASD7v86l8hvQkLor0GVA32hKIaOwyH7Iwqq2mK3j1DO +4fA== X-Gm-Message-State: ALoCoQlmnmVTEiDNHni/pIk1Ik/umkGL9q6APYDYn9TwZRE7+EIdchmK/4aQTRP3H3hFlSjRU6lS X-Received: by 10.68.245.162 with SMTP id xp2mr12897701pbc.69.1394862008524; Fri, 14 Mar 2014 22:40:08 -0700 (PDT) Received: from localhost.localdomain (pdddd29.tkyoac00.ap.so-net.ne.jp. [218.221.221.41]) by mx.google.com with ESMTPSA id iv2sm22280176pbc.19.2014.03.14.22.40.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 22:40:07 -0700 (PDT) From: AKASHI Takahiro To: will.deacon@arm.com Subject: [PATCH v5 4/4] arm64: is_compat_task is defined both in asm/compat.h and linux/compat.h Date: Sat, 15 Mar 2014 14:39:08 +0900 Message-Id: <1394861948-28712-5-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1394861948-28712-1-git-send-email-takahiro.akashi@linaro.org> References: <1394705491-12343-1-git-send-email-takahiro.akashi@linaro.org> <1394861948-28712-1-git-send-email-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140315_014029_982560_B7AE88D0 X-CRM114-Status: GOOD ( 11.28 ) X-Spam-Score: -1.9 (-) Cc: linaro-kernel@lists.linaro.org, rgb@redhat.com, catalin.marinas@arm.com, arndb@arndb.de, eparis@redhat.com, linux-kernel@vger.kernel.org, AKASHI Takahiro , dsaxena@linaro.org, viro@zeniv.linux.org.uk, linux-audit@redhat.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Some kernel files may include both linux/compat.h and asm/compat.h directly or indirectly. Since both header files contain is_compat_task() under !CONFIG_COMPAT, compiling them with !CONFIG_COMPAT will eventually fail. Such files include kernel/auditsc.c, kernel/seccomp.c and init/do_mountfs.c (do_mountfs.c may read asm/compat.h via asm/ftrace.h once ftrace is implemented). So this patch proactively 1) removes is_compat_task() under !CONFIG_COMPAT from asm/compat.h 2) replaces asm/compat.h to linux/compat.h in kernel/*.c, but asm/compat.h is still necessary in ptrace.c and process.c because they use is_compat_thread(). Signed-off-by: AKASHI Takahiro Acked-by: Richard Guy Briggs --- arch/arm64/include/asm/compat.h | 5 ----- arch/arm64/kernel/hw_breakpoint.c | 2 +- arch/arm64/kernel/process.c | 1 + arch/arm64/kernel/ptrace.c | 1 + arch/arm64/kernel/signal.c | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index fda2704..3b334f9 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h @@ -305,11 +305,6 @@ static inline int is_compat_thread(struct thread_info *thread) #else /* !CONFIG_COMPAT */ -static inline int is_compat_task(void) -{ - return 0; -} - static inline int is_compat_thread(struct thread_info *thread) { return 0; diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c index f17f581..a45e2db 100644 --- a/arch/arm64/kernel/hw_breakpoint.c +++ b/arch/arm64/kernel/hw_breakpoint.c @@ -20,6 +20,7 @@ #define pr_fmt(fmt) "hw-breakpoint: " fmt +#include #include #include #include @@ -27,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 1c0a9be..fc8a387 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -20,6 +20,7 @@ #include +#include #include #include #include diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index f606276..c47a3ed 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -19,6 +19,7 @@ * along with this program. If not, see . */ +#include #include #include #include diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index 890a591..4a09989 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -17,6 +17,7 @@ * along with this program. If not, see . */ +#include #include #include #include @@ -25,7 +26,6 @@ #include #include -#include #include #include #include