From patchwork Sun Aug 14 12:51:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjarne Steinsbo X-Patchwork-Id: 1064442 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7ECqDI9018416 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 14 Aug 2011 12:52:34 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QsaAY-00047Y-7J; Sun, 14 Aug 2011 12:51:58 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QsaAX-0000b1-OI; Sun, 14 Aug 2011 12:51:57 +0000 Received: from mail-vx0-f177.google.com ([209.85.220.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QsaAU-0000ag-8E for linux-arm-kernel@lists.infradead.org; Sun, 14 Aug 2011 12:51:55 +0000 Received: by vxj2 with SMTP id 2so4037152vxj.36 for ; Sun, 14 Aug 2011 05:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=BjC+4kdNJgWnGrz3Qxnw1HxoJliA30SQrtqd8JqtZy4=; b=bHXvDM+rZuhRSepwZbmAB3wY8Lwp5Tw2PB/u7yIS9aIzhJDqWAFQRRpkeqPs/aoahR M7er5I0vCkoMynXU1YLDOtiZRY0v37laJ4tM77lQkGrjEnR4TYqNpTHuWo7P5C6fEFfO Shs1XhhIDIadfccv62aETNjgN1PhWogAN5f2w= MIME-Version: 1.0 Received: by 10.220.150.14 with SMTP id w14mr728922vcv.167.1313326308615; Sun, 14 Aug 2011 05:51:48 -0700 (PDT) Received: by 10.220.203.138 with HTTP; Sun, 14 Aug 2011 05:51:48 -0700 (PDT) Date: Sun, 14 Aug 2011 14:51:48 +0200 Message-ID: Subject: [PATCH] ARM: mm/alignment.c: Fix build breakage when CONFIG_PROC_FS is not selected From: Bjarne Steinsbo To: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110814_085154_577078_7302A464 X-CRM114-Status: GOOD ( 11.21 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (bsteinsbo[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.177 listed in list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service Cc: Russell King X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 14 Aug 2011 12:52:35 +0000 (UTC) Compiling mm/alignment.c without CONFIG_PROC_FS selected fails with undefined cpu_is_v6_unaligned() and safe_usermode(). Move #ifdef CONFIG_PROC_FS, including definition of usermode_action[], further down to avoid this problem. Cc: Russell King Signed-off-by: Bjarne Steinsbo Acked-by: Dave Martin --- arch/arm/mm/alignment.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index cfbcf8b..c335c76 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c @@ -86,16 +86,6 @@ core_param(alignment, ai_usermode, int, 0600); #define UM_FIXUP (1 << 1) #define UM_SIGNAL (1 << 2) -#ifdef CONFIG_PROC_FS -static const char *usermode_action[] = { - "ignored", - "warn", - "fixup", - "fixup+warn", - "signal", - "signal+warn" -}; - /* Return true if and only if the ARMv6 unaligned access model is in use. */ static bool cpu_is_v6_unaligned(void) { @@ -123,6 +113,16 @@ static int safe_usermode(int new_usermode, bool warn) return new_usermode; } +#ifdef CONFIG_PROC_FS +static const char *usermode_action[] = { + "ignored", + "warn", + "fixup", + "fixup+warn", + "signal", + "signal+warn" +}; + static int alignment_proc_show(struct seq_file *m, void *v) { seq_printf(m, "User:\t\t%lu\n", ai_user);