]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
s390/disassembler: remove insn_to_mnemonic()
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 6 Nov 2017 12:28:38 +0000 (13:28 +0100)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 8 Nov 2017 21:10:49 +0000 (22:10 +0100)
insn_to_mnemonic() was introduced ages ago for KVM debugging, but is
unused in the meantime. Therefore remove it.

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/s390/include/asm/dis.h
arch/s390/kernel/dis.c

index 37f617dfbeded0de8edb9f9f4e1a263c46bd0635..793508c8fc48a483e9c6d1b6783148c6776edf61 100644 (file)
@@ -44,7 +44,6 @@ struct pt_regs;
 
 void show_code(struct pt_regs *regs);
 void print_fn_code(unsigned char *code, unsigned long len);
-int insn_to_mnemonic(unsigned char *instruction, char *buf, unsigned int len);
 struct s390_insn *find_insn(unsigned char *code);
 
 static inline int is_known_insn(unsigned char *code)
index 94e96a7bd6d8f65f480caae6d2fee7268ca866b1..2cf4a084763e3137d87e25518958d8e05485d1bb 100644 (file)
@@ -1961,34 +1961,6 @@ struct s390_insn *find_insn(unsigned char *code)
        return NULL;
 }
 
-/**
- * insn_to_mnemonic - decode an s390 instruction
- * @instruction: instruction to decode
- * @buf: buffer to fill with mnemonic
- * @len: length of buffer
- *
- * Decode the instruction at @instruction and store the corresponding
- * mnemonic into @buf of length @len.
- * @buf is left unchanged if the instruction could not be decoded.
- * Returns:
- *  %0 on success, %-ENOENT if the instruction was not found.
- */
-int insn_to_mnemonic(unsigned char *instruction, char *buf, unsigned int len)
-{
-       struct s390_insn *insn;
-
-       insn = find_insn(instruction);
-       if (!insn)
-               return -ENOENT;
-       if (insn->name[0] == '\0')
-               snprintf(buf, len, "%s",
-                        long_insn_name[(int) insn->name[1]]);
-       else
-               snprintf(buf, len, "%.5s", insn->name);
-       return 0;
-}
-EXPORT_SYMBOL_GPL(insn_to_mnemonic);
-
 static int print_insn(char *buffer, unsigned char *code, unsigned long addr)
 {
        struct s390_insn *insn;