From patchwork Thu Jan 1 22:40:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 16244 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 0FA70DDEE1 for ; Fri, 2 Jan 2009 09:38:57 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753536AbZAAWi4 (ORCPT ); Thu, 1 Jan 2009 17:38:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753669AbZAAWi4 (ORCPT ); Thu, 1 Jan 2009 17:38:56 -0500 Received: from pfepb.post.tele.dk ([195.41.46.236]:55863 "EHLO pfepb.post.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753536AbZAAWiz (ORCPT ); Thu, 1 Jan 2009 17:38:55 -0500 Received: from ravnborg.org (x1-6-00-1e-2a-84-ae-3e.k225.webspeed.dk [80.163.61.94]) by pfepb.post.tele.dk (Postfix) with ESMTP id 04456F84022; Thu, 1 Jan 2009 23:38:51 +0100 (CET) Received: by ravnborg.org (Postfix, from userid 500) id 604A2580D0; Thu, 1 Jan 2009 23:40:31 +0100 (CET) From: Sam Ravnborg To: David Miller , sparclinux Cc: Sam Ravnborg Subject: [PATCH 3/4] sparc: fix warning in userspace header traps.h Date: Thu, 1 Jan 2009 23:40:29 +0100 Message-Id: <1230849630-22482-3-git-send-email-sam@ravnborg.org> X-Mailer: git-send-email 1.6.0.2.GIT In-Reply-To: <20090101223600.GA19647@uranus.ravnborg.org> References: <20090101223600.GA19647@uranus.ravnborg.org> Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org Fix following warning: traps.h:23: extern's make no sense in userspace Add an ifdef __KERNEL__ block that cover the extern definition and a few related things that neither is for userspace. Signed-off-by: Sam Ravnborg --- arch/sparc/include/asm/traps.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/include/asm/traps.h b/arch/sparc/include/asm/traps.h index bebdbf8..4becd66 100644 --- a/arch/sparc/include/asm/traps.h +++ b/arch/sparc/include/asm/traps.h @@ -10,7 +10,7 @@ #define NUM_SPARC_TRAPS 255 #ifndef __ASSEMBLY__ - +#ifdef __KERNEL__ /* This is for V8 compliant Sparc CPUS */ struct tt_entry { unsigned long inst_one; @@ -29,7 +29,7 @@ static inline unsigned long get_tbr(void) __asm__ __volatile__("rd %%tbr, %0\n\t" : "=r" (tbr)); return tbr; } - +#endif /* (__KERNEL__) */ #endif /* !(__ASSEMBLY__) */ /* For patching the trap table at boot time, we need to know how to