Re: arch/powerpc/xmon/dis-asm.h: 2 * wrong specifiers ?

From: Michael Ellerman
Date: Tue Jun 28 2016 - 00:08:18 EST


On Mon, 2016-06-27 at 09:04 +0100, David Binderman wrote:

> Hello there,
>
> linux-4.7-rc5/arch/powerpc/xmon/dis-asm.h:20]: (warning) %x in format
> string (no. 1) requires 'unsigned int' but the argument type is
> 'unsigned long'.
> [linux-4.7-rc5/arch/powerpc/xmon/dis-asm.h:26]: (warning) %x in format
> string (no. 1) requires 'unsigned int' but the argument type is
> 'unsigned long'.

What config / toolchain are you using? I've never seen these.

Oh, I see, with CONFIG_XMON_DISASSEMBLY=n.

> static inline int print_insn_powerpc(unsigned long insn, unsigned long memaddr)
> {
> printf("%.8x", insn);
> return 0;
> }

Send me a patch to cast insn to unsigned int?

cheers