From patchwork Wed Apr 30 09:51:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 29393 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 787B2203F3 for ; Wed, 30 Apr 2014 09:54:17 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id hz1sf7016680pad.0 for ; Wed, 30 Apr 2014 02:54:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=4QXgkWMt5NVKt8XkJtHGaf2FPpzHgwQ6X60mUjFXDE0=; b=Wpnaocztq3v6MLZhkqXOX5w/sR2pzjlET4AaXMD0cqnVutw9wCA1JpQ7f0n8bselm+ SMIbb5jy9sA5U3R20QmVkjwpytS3RXn49L03QodDjnBgvCqEcs7W02xQpToC4HJkZiyO HxOsGboZ6oxd2EG7jAhGc5iJ/geLoDT7hnt9kJ2dj8kZ3AYBZSUvg2pdsG9e4q5NSobh KaKZmNjWAaV+mLJIdPdo76NRplgx1qLBIKplql0Bj8tWq0fgt09by4pP37SLtPRe/AYX NE5DrpWABUKMdJthnVwzGL8U18nK/EfeVbCxtnqlJXijkNBm5cNA4EK0jXdjWlCPj75M vOqg== X-Gm-Message-State: ALoCoQlE/XSkoKzW0YGV6mbKv3KnFEQGT9LvywCdQh0ZJWipdH3rSCHiAEtZoJ3BRRZ2ryyPkosO X-Received: by 10.66.102.36 with SMTP id fl4mr1820028pab.20.1398851655960; Wed, 30 Apr 2014 02:54:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.201 with SMTP id f67ls450821qgd.91.gmail; Wed, 30 Apr 2014 02:54:15 -0700 (PDT) X-Received: by 10.221.34.7 with SMTP id sq7mr3106680vcb.5.1398851655803; Wed, 30 Apr 2014 02:54:15 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id iy9si5206943vec.33.2014.04.30.02.54.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Apr 2014 02:54:15 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id lh4so1850528vcb.6 for ; Wed, 30 Apr 2014 02:54:15 -0700 (PDT) X-Received: by 10.52.166.102 with SMTP id zf6mr2639408vdb.2.1398851655718; Wed, 30 Apr 2014 02:54:15 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp265221vcb; Wed, 30 Apr 2014 02:54:15 -0700 (PDT) X-Received: by 10.66.218.193 with SMTP id pi1mr6957910pac.20.1398851654749; Wed, 30 Apr 2014 02:54:14 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pc9si16368639pac.189.2014.04.30.02.54.14 for ; Wed, 30 Apr 2014 02:54:14 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758304AbaD3JyH (ORCPT + 28 others); Wed, 30 Apr 2014 05:54:07 -0400 Received: from mail-ie0-f170.google.com ([209.85.223.170]:64732 "EHLO mail-ie0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751451AbaD3JyD (ORCPT ); Wed, 30 Apr 2014 05:54:03 -0400 Received: by mail-ie0-f170.google.com with SMTP id rd18so1627945iec.1 for ; Wed, 30 Apr 2014 02:54:01 -0700 (PDT) X-Received: by 10.43.132.136 with SMTP id hu8mr2527813icc.61.1398851640932; Wed, 30 Apr 2014 02:54:00 -0700 (PDT) Received: from localhost.localdomain (KD182249095136.au-net.ne.jp. [182.249.95.136]) by mx.google.com with ESMTPSA id s8sm4428691ige.4.2014.04.30.02.53.55 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Apr 2014 02:53:59 -0700 (PDT) From: AKASHI Takahiro To: will.deacon@arm.com Cc: viro@zeniv.linux.org.uk, eparis@redhat.com, rgb@redhat.com, catalin.marinas@arm.com, dsaxena@linaro.org, arndb@arndb.de, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, linux-audit@redhat.com, AKASHI Takahiro Subject: [PATCH v6 4/4] arm64: is_compat_task is defined both in asm/compat.h and linux/compat.h Date: Wed, 30 Apr 2014 18:51:32 +0900 Message-Id: <1398851492-16345-5-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1398851492-16345-1-git-send-email-takahiro.akashi@linaro.org> References: <1394861948-28712-1-git-send-email-takahiro.akashi@linaro.org> <1398851492-16345-1-git-send-email-takahiro.akashi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: takahiro.akashi@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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(). Acked-by: Will Deacon Signed-off-by: AKASHI Takahiro --- 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 e71f81f..253e33b 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 bee7897..df1cf15 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 6391485..ccc2a3e 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 6d666dc..4b58e81 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