Re: [PATCH] x86: Avoid pr_cont() in show_opcodes()
From: Joe Perches
Date: Wed Jul 18 2018 - 04:41:15 EST
On Tue, 2018-07-17 at 14:19 -0700, Joe Perches wrote:
> diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
> []
> > @@ -93,26 +93,15 @@ static void printk_stack_address(unsigned long address, int reliable,
> > */
> > void show_opcodes(u8 *rip, const char *loglvl)
> > {
> > - unsigned int code_prologue = OPCODE_BUFSIZE * 2 / 3;
> > + const unsigned int prologue = OPCODE_BUFSIZE * 2 / 3;
>
> And this might be better as a #define to avoid
> a few more bytes of stack consumption.
Apologies for this silly suggestion.
automatics are not structs and gcc will eliminate
this declaration at all compiler optimization levels.