Message ID | 2d89732a9062b2cf2651728804e4b8f6c9b9358e.1597643164.git.christophe.leroy@csgroup.eu (mailing list archive) |
---|---|
State | Accepted |
Commit | 8f020c7ca300fd60374f0347814c92ea513c24da |
Headers | show |
Series | [v1] powerpc/process: Replace #ifdef CONFIG_KALLSYMS by IS_ENABLED() | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (f04b169e953c4db1a3a3c1d23eea09c726f01ee5) |
snowpatch_ozlabs/build-ppc64le | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-ppc64be | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-ppc64e | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-pmac32 | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/checkpatch | warning | total: 0 errors, 2 warnings, 2 checks, 18 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
On Mon, 17 Aug 2020 05:46:44 +0000 (UTC), Christophe Leroy wrote: > The #ifdef CONFIG_KALLSYMS encloses some printk which can > compile in all cases. > > Replace by IS_ENABLED(). Applied to powerpc/next. [1/1] powerpc/process: Replace #ifdef CONFIG_KALLSYMS by IS_ENABLED() https://git.kernel.org/powerpc/c/8f020c7ca300fd60374f0347814c92ea513c24da cheers
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 087711aa0126..987bc8e73d5e 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -1469,14 +1469,14 @@ void show_regs(struct pt_regs * regs) break; } pr_cont("\n"); -#ifdef CONFIG_KALLSYMS /* * Lookup NIP late so we have the best change of getting the * above info out without failing */ - printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip); - printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link); -#endif + if (IS_ENABLED(CONFIG_KALLSYMS)) { + printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip); + printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link); + } show_stack(current, (unsigned long *) regs->gpr[1], KERN_DEFAULT); if (!user_mode(regs)) show_instructions(regs);
The #ifdef CONFIG_KALLSYMS encloses some printk which can compile in all cases. Replace by IS_ENABLED(). Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> --- arch/powerpc/kernel/process.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)