powerpc/xmon: Do not compute/store the major opcode
authorMathieu Malaterre <malat@debian.org>
Tue, 26 Dec 2017 13:25:47 +0000 (14:25 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 21 Jan 2018 12:37:43 +0000 (23:37 +1100)
In commit 5b102782c7f4 ("powerpc/xmon: Enable disassembly files (compilation
changes)") usage of variable `op` has been removed. Completely remove opcode
computation since not used anymore.

Fix fatal warning:

arch/powerpc/xmon/ppc-dis.c: In function ‘lookup_powerpc’:
arch/powerpc/xmon/ppc-dis.c:96:17: error: variable ‘op’ set but not used [-Werror=unused-but-set-variable]
   unsigned long op;
                 ^~

Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/xmon/ppc-dis.c

index 31db8c072acd03b80dcf177c842273d508409d0a..9deea5ee13f652cd6c8a8b7f1f7d58a9229f31ae 100644 (file)
@@ -93,10 +93,6 @@ lookup_powerpc (unsigned long insn, ppc_cpu_t dialect)
 {
   const struct powerpc_opcode *opcode;
   const struct powerpc_opcode *opcode_end;
-  unsigned long op;
-
-  /* Get the major opcode of the instruction.  */
-  op = PPC_OP (insn);
 
   opcode_end = powerpc_opcodes + powerpc_num_opcodes;
   /* Find the first match in the opcode table for this major opcode.  */