powerpc/udbg: Make it safe to call udbg_printf() always
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 11 Oct 2019 08:30:39 +0000 (19:30 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 11 Oct 2019 08:33:25 +0000 (19:33 +1100)
commitf7a678a8fa548fdd9e89e006f35b0fd60b6f3acc
treee2060f43d96342e0e38e50c7a24aa74ee79c10ae
parentcd1d55f16d48d97d681d9534170ce712ac1d09e7
powerpc/udbg: Make it safe to call udbg_printf() always

Make udbg_printf() check if udbg_putc is set, and if not just return.
This makes it safe to call udbg_printf() anytime, even when a udbg
backend has not been registered, which means we can avoid some ifdefs
at call sites.

Signed-off-by: Qian Cai <cai@lca.pw>
[mpe: Split out of larger patch, write change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/udbg.c