From patchwork Fri May 29 05:33:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 27818 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 54865B707F for ; Fri, 29 May 2009 15:36:28 +1000 (EST) Received: by ozlabs.org (Postfix) id E45A0DE90A; Fri, 29 May 2009 15:34:32 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id E2DE4DE909 for ; Fri, 29 May 2009 15:34:32 +1000 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: by ozlabs.org (Postfix, from userid 1034) id 640E3DDFB1; Fri, 29 May 2009 15:33:36 +1000 (EST) To: Message-Id: <2f000af3c9826e0b4d21f890e9e2a5d20ca048f4.1243575200.git.michael@ellerman.id.au> In-Reply-To: <8e59964be84e85d2ca8c08db3fdd979db61fb0f6.1243575200.git.michael@ellerman.id.au> References: <8e59964be84e85d2ca8c08db3fdd979db61fb0f6.1243575200.git.michael@ellerman.id.au> From: Michael Ellerman Subject: [PATCH 3/3] powerpc/ftrace: Use PPC_INST_NOP directly Date: Fri, 29 May 2009 15:33:36 +1000 (EST) X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org There's no need to wrap PPC_INST_NOP in a static inline. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/ftrace.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 8620ecb..f4ad248 100644 --- a/arch/powerpc/kernel/ftrace.c +++ b/arch/powerpc/kernel/ftrace.c @@ -25,11 +25,6 @@ #ifdef CONFIG_DYNAMIC_FTRACE -static unsigned int ftrace_nop_replace(void) -{ - return PPC_INST_NOP; -} - static unsigned int ftrace_call_replace(unsigned long ip, unsigned long addr, int link) { @@ -314,7 +309,7 @@ int ftrace_make_nop(struct module *mod, if (test_24bit_addr(ip, addr)) { /* within range */ old = ftrace_call_replace(ip, addr, 1); - new = ftrace_nop_replace(); + new = PPC_INST_NOP; return ftrace_modify_code(ip, old, new); } @@ -452,7 +447,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) */ if (test_24bit_addr(ip, addr)) { /* within range */ - old = ftrace_nop_replace(); + old = PPC_INST_NOP; new = ftrace_call_replace(ip, addr, 1); return ftrace_modify_code(ip, old, new); }