diff options
Diffstat (limited to 'arch/s390/kernel/dis.c')
| -rw-r--r-- | arch/s390/kernel/dis.c | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index a7f9abd98cf..7f4a4a8c847 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c @@ -840,7 +840,6 @@ static struct insn opcode_b2[] = {  	{ "stcke", 0x78, INSTR_S_RD },  	{ "sacf", 0x79, INSTR_S_RD },  	{ "stsi", 0x7d, INSTR_S_RD }, -	{ "spp", 0x80, INSTR_S_RD },  	{ "srnm", 0x99, INSTR_S_RD },  	{ "stfpc", 0x9c, INSTR_S_RD },  	{ "lfpc", 0x9d, INSTR_S_RD }, @@ -1697,14 +1696,15 @@ static struct insn *find_insn(unsigned char *code)   * 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. + * 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[8]) +int insn_to_mnemonic(unsigned char *instruction, char *buf, unsigned int len)  {  	struct insn *insn; @@ -1712,10 +1712,10 @@ int insn_to_mnemonic(unsigned char *instruction, char buf[8])  	if (!insn)  		return -ENOENT;  	if (insn->name[0] == '\0') -		snprintf(buf, sizeof(buf), "%s", +		snprintf(buf, len, "%s",  			 long_insn_name[(int) insn->name[1]]);  	else -		snprintf(buf, sizeof(buf), "%.5s", insn->name); +		snprintf(buf, len, "%.5s", insn->name);  	return 0;  }  EXPORT_SYMBOL_GPL(insn_to_mnemonic);  |