From patchwork Sat Sep 14 00:49:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sukadev Bhattiprolu X-Patchwork-Id: 274886 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 02E572C0A07 for ; Sat, 14 Sep 2013 10:53:01 +1000 (EST) Received: by ozlabs.org (Postfix) id B30E82C0164; Sat, 14 Sep 2013 10:49:28 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from e9.ny.us.ibm.com (e9.ny.us.ibm.com [32.97.182.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e9.ny.us.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id D9C122C0165 for ; Sat, 14 Sep 2013 10:49:27 +1000 (EST) Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Sep 2013 20:49:25 -0400 Received: from d01dlp02.pok.ibm.com (9.56.250.167) by e9.ny.us.ibm.com (192.168.1.109) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 13 Sep 2013 20:49:24 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 92BC26E803C for ; Fri, 13 Sep 2013 20:49:23 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by b01cxnp22033.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8E0nNQK48955442 for ; Sat, 14 Sep 2013 00:49:23 GMT Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r8E0nMDi001619 for ; Fri, 13 Sep 2013 21:49:22 -0300 Received: from suka2.usor.ibm.com (suka2.usor.ibm.com [9.70.94.91] (may be forged)) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r8E0nFIt001311; Fri, 13 Sep 2013 21:49:21 -0300 From: Sukadev Bhattiprolu To: Subject: [PATCH 6/8][v4] powerpc: Rename branch_opcode() to instr_opcode() Date: Fri, 13 Sep 2013 17:49:13 -0700 Message-Id: <1379119755-21025-7-git-send-email-sukadev@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1379119755-21025-1-git-send-email-sukadev@linux.vnet.ibm.com> References: <1379119755-21025-1-git-send-email-sukadev@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13091400-7182-0000-0000-000008680CFC Cc: linuxppc-dev@ozlabs.org, Paul Mackerras , Michael Ellerman , Stephane Eranian , Anshuman Khandual X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16rc2 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 --- 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)