diff options
| author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2017-11-06 07:28:38 -0500 |
|---|---|---|
| committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2017-11-08 16:10:49 -0500 |
| commit | dac6dc267d0e906fa9263462d4ebd78970a8b511 (patch) | |
| tree | 03bc57143d137a49e1ed6f1b7cbed821dc98ea38 | |
| parent | 399c5acd5837f6c93d784d8dd25ebae5a50362e1 (diff) | |
s390/disassembler: remove insn_to_mnemonic()
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>
| -rw-r--r-- | arch/s390/include/asm/dis.h | 1 | ||||
| -rw-r--r-- | arch/s390/kernel/dis.c | 28 |
2 files changed, 0 insertions, 29 deletions
diff --git a/arch/s390/include/asm/dis.h b/arch/s390/include/asm/dis.h index 37f617dfbede..793508c8fc48 100644 --- a/arch/s390/include/asm/dis.h +++ b/arch/s390/include/asm/dis.h | |||
| @@ -44,7 +44,6 @@ struct pt_regs; | |||
| 44 | 44 | ||
| 45 | void show_code(struct pt_regs *regs); | 45 | void show_code(struct pt_regs *regs); |
| 46 | void print_fn_code(unsigned char *code, unsigned long len); | 46 | void print_fn_code(unsigned char *code, unsigned long len); |
| 47 | int insn_to_mnemonic(unsigned char *instruction, char *buf, unsigned int len); | ||
| 48 | struct s390_insn *find_insn(unsigned char *code); | 47 | struct s390_insn *find_insn(unsigned char *code); |
| 49 | 48 | ||
| 50 | static inline int is_known_insn(unsigned char *code) | 49 | static inline int is_known_insn(unsigned char *code) |
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index 94e96a7bd6d8..2cf4a084763e 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c | |||
| @@ -1961,34 +1961,6 @@ struct s390_insn *find_insn(unsigned char *code) | |||
| 1961 | return NULL; | 1961 | return NULL; |
| 1962 | } | 1962 | } |
| 1963 | 1963 | ||
| 1964 | /** | ||
| 1965 | * insn_to_mnemonic - decode an s390 instruction | ||
| 1966 | * @instruction: instruction to decode | ||
| 1967 | * @buf: buffer to fill with mnemonic | ||
| 1968 | * @len: length of buffer | ||
| 1969 | * | ||
| 1970 | * Decode the instruction at @instruction and store the corresponding | ||
| 1971 | * mnemonic into @buf of length @len. | ||
| 1972 | * @buf is left unchanged if the instruction could not be decoded. | ||
| 1973 | * Returns: | ||
| 1974 | * %0 on success, %-ENOENT if the instruction was not found. | ||
| 1975 | */ | ||
| 1976 | int insn_to_mnemonic(unsigned char *instruction, char *buf, unsigned int len) | ||
| 1977 | { | ||
| 1978 | struct s390_insn *insn; | ||
| 1979 | |||
| 1980 | insn = find_insn(instruction); | ||
| 1981 | if (!insn) | ||
| 1982 | return -ENOENT; | ||
| 1983 | if (insn->name[0] == '\0') | ||
| 1984 | snprintf(buf, len, "%s", | ||
| 1985 | long_insn_name[(int) insn->name[1]]); | ||
| 1986 | else | ||
| 1987 | snprintf(buf, len, "%.5s", insn->name); | ||
| 1988 | return 0; | ||
| 1989 | } | ||
| 1990 | EXPORT_SYMBOL_GPL(insn_to_mnemonic); | ||
| 1991 | |||
| 1992 | static int print_insn(char *buffer, unsigned char *code, unsigned long addr) | 1964 | static int print_insn(char *buffer, unsigned char *code, unsigned long addr) |
| 1993 | { | 1965 | { |
| 1994 | struct s390_insn *insn; | 1966 | struct s390_insn *insn; |
