]> asedeno.scripts.mit.edu Git - linux.git/commit
powerpc/xmon: Add __printf annotation to xmon_printf()
authorMathieu Malaterre <malat@debian.org>
Sun, 25 Mar 2018 09:06:47 +0000 (11:06 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 25 May 2018 02:04:36 +0000 (12:04 +1000)
commite70d8f55268ba95f00c61857df2bab638365f10f
tree59612895eef9d3225e6c57529624d6c080cc0cc1
parent6671683db8540e5766f44a1089549c168730ae41
powerpc/xmon: Add __printf annotation to xmon_printf()

This allows the compiler to verify the format strings vs the types of
the arguments.

Update the other prototype declarations in asm/xmon.h.

Silence warnings (triggered at W=1) by adding relevant __printf
attribute. Move #define at bottom of the file to prevent conflict with
gcc attribute.

Solves the original warning:

  arch/powerpc/xmon/nonstdio.c:178:2: error: function might be
  possible candidate for ‘gnu_printf’ format attribute

In turn this uncovered many formatting errors in xmon.c, all fixed in
this patch.

Signed-off-by: Mathieu Malaterre <malat@debian.org>
[mpe: Always use px not p, fixup the 44x specific code, tweak change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/xmon.h
arch/powerpc/xmon/nonstdio.h
arch/powerpc/xmon/spu-dis.c
arch/powerpc/xmon/xmon.c