Re: [PATCH v6] x86: Avoid pr_cont() in show_opcodes().

From: Peter Zijlstra
Date: Thu Jul 19 2018 - 09:56:23 EST


On Thu, Jul 19, 2018 at 10:53:03PM +0900, Tetsuo Handa wrote:
> + if (probe_kernel_read(opcodes, rip - PROLOGUE_SIZE, OPCODE_BUFSIZE))
> + printk("%sCode: Bad RIP value.\n", loglvl);
> + else
> + printk("%sCode: %" __stringify(PROLOGUE_SIZE) "ph <%02x> %"
> + __stringify(EPILOGUE_SIZE) "ph\n", loglvl, opcodes,
> + opcodes[PROLOGUE_SIZE], opcodes + PROLOGUE_SIZE + 1);
> }

Kernel coding style wants { } on the else branch because multi-line, and
if we have { } on one leg of an if-else it should also be on the other.