From patchwork Wed Oct 2 00:15:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sukadev Bhattiprolu X-Patchwork-Id: 279627 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 50CA92C00D0 for ; Wed, 2 Oct 2013 10:17:43 +1000 (EST) Received: by ozlabs.org (Postfix) id BEF502C0094; Wed, 2 Oct 2013 10:15:36 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org 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 d03dlp03.boulder.ibm.com (9.17.202.179) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 1 Oct 2013 18:15:29 -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 Received: from suka2.usor.ibm.com.com (suka2.usor.ibm.com [9.70.94.91] (may be forged)) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r920IVUi027960; Tue, 1 Oct 2013 18:18:33 -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> X-Mailer: git-send-email 1.7.9.5 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> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13100200-0928-0000-0000-0000022B51BC Cc: Michael Ellerman , linux-kernel@vger.kernel.org, Stephane Eranian , linuxppc-dev@ozlabs.org, Paul Mackerras , 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 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)