From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e32.co.us.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 23EF02C00BA for ; Wed, 2 Oct 2013 10:15:34 +1000 (EST) Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Oct 2013 18:15:32 -0600 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 653A519D8036 for ; Tue, 1 Oct 2013 18:15:27 -0600 (MDT) Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r920FSLZ271428 for ; Tue, 1 Oct 2013 18:15:28 -0600 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r920IXh9028134 for ; Tue, 1 Oct 2013 18:18:34 -0600 From: Sukadev Bhattiprolu To: Arnaldo Carvalho de Melo Subject: [PATCH 4/9][v5] powerpc: Rename branch_opcode() to instr_opcode() Date: Tue, 1 Oct 2013 17:15:05 -0700 Message-Id: <1380672911-12812-5-git-send-email-sukadev@linux.vnet.ibm.com> In-Reply-To: <1380672911-12812-1-git-send-email-sukadev@linux.vnet.ibm.com> References: <1380672911-12812-1-git-send-email-sukadev@linux.vnet.ibm.com> Cc: Michael Ellerman , linux-kernel@vger.kernel.org, Stephane Eranian , linuxppc-dev@ozlabs.org, Paul Mackerras , Anshuman Khandual List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , The logic used in branch_opcode() to extract the opcode for an instruction applies to non branch instructions also. So rename to instr_opcode(). Signed-off-by: Sukadev Bhattiprolu Reviewed-by: Anshuman Khandual --- arch/powerpc/lib/code-patching.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c index 17e5b23..2bc9db3 100644 --- a/arch/powerpc/lib/code-patching.c +++ b/arch/powerpc/lib/code-patching.c @@ -72,19 +72,19 @@ unsigned int create_cond_branch(const unsigned int *addr, return instruction; } -static unsigned int branch_opcode(unsigned int instr) +static unsigned int instr_opcode(unsigned int instr) { return (instr >> 26) & 0x3F; } static int instr_is_branch_iform(unsigned int instr) { - return branch_opcode(instr) == 18; + return instr_opcode(instr) == 18; } static int instr_is_branch_bform(unsigned int instr) { - return branch_opcode(instr) == 16; + return instr_opcode(instr) == 16; } int instr_is_relative_branch(unsigned int instr) -- 1.7.9.5