Re: [PATCH] x86/tools/relocs: Mark die() with the printf function attr format

From: Greg Kroah-Hartman
Date: Mon Jun 28 2021 - 11:04:06 EST


On Mon, Jun 28, 2021 at 04:25:45PM +0200, Borislav Petkov wrote:
> On Sun, Jun 27, 2021 at 05:01:28PM +0200, Greg Kroah-Hartman wrote:
> > This works for me! It should fix the static checking tool that keeps
> > tripping over this pointless warning :)
> >
> > Want to turn it into a real patch?
>
> How's that?
>
> ---
> From: Borislav Petkov <bp@xxxxxxx>
>
> Mark die() as a function which accepts printf-style arguments so that
> the compiler can typecheck them against the supplied format string.
>
> Use the C99 inttypes.h format specifiers as relocs.c gets built for both
> 32- and 64-bit.
>
> Original version of the patch by Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>
> Signed-off-by: Borislav Petkov <bp@xxxxxxx>
> ---
> arch/x86/tools/relocs.c | 37 ++++++++++++++++++++-----------------
> arch/x86/tools/relocs.h | 1 +
> 2 files changed, 21 insertions(+), 17 deletions(-)

Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>