]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/prom: Fix %u/%llx usage since prom_printf() change
authorMathieu Malaterre <malat@debian.org>
Tue, 29 May 2018 19:20:01 +0000 (21:20 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 1 Jun 2018 15:48:11 +0000 (01:48 +1000)
commitd69e10266e194912e4ce10bc318fdba514b5528c
treee26877230b9876f1da9073d747070722046c41c3
parent6d158905148ba9424b5d846a95bd5c461114cde2
powerpc/prom: Fix %u/%llx usage since prom_printf() change

In commit 4a6a7d515b15 ("powerpc: Add __printf verification to
prom_printf") __printf attribute was added to prom_printf(), which
means GCC started warning about type/format mismatches. As part of
that commit we changed some "%lx" formats to "%llx" where the type is
actually unsigned long long.

Unfortunately prom_printf() doesn't know how to print "%llx", it just
prints a literal "lx", eg:

  reserved memory map:
    lx - lx
    lx - lx

prom_printf() also doesn't know how to print "%u" (only "%lu"), it
just prints a literal "u", eg:

  Max number of cores passed to firmware: u (NR_CPUS = 2048)

Instead of:

  Max number of cores passed to firmware: 2048 (NR_CPUS = 2048)

This commit adds support for the missing formatters.

Fixes: 4a6a7d515b15 ("powerpc: Add __printf verification to prom_printf")
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mathieu Malaterre <malat@debian.org>
Tested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/prom_init.c