]> asedeno.scripts.mit.edu Git - linux.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)
commit8af1da40669609707303eecdb857f48a5ba5792d
treee26877230b9876f1da9073d747070722046c41c3
parent9a6d2022bacd8fca0be6297459a02dfd28dad6ba
powerpc/prom: Fix %u/%llx usage since prom_printf() change

In commit eae5f709a4d7 ("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: eae5f709a4d7 ("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