• Alex Elder's avatar
    printk: miscellaneous cleanups · 249771b8
    Alex Elder authored
    Some small cleanups to kernel/printk/printk.c.  None of them should
    cause any change in behavior.
    
      - When CONFIG_PRINTK is defined, parenthesize the value of LOG_LINE_MAX.
      - When CONFIG_PRINTK is *not* defined, there is an extra LOG_LINE_MAX
        definition; delete it.
      - Pull an assignment out of a conditional expression in console_setup().
      - Use isdigit() in console_setup() rather than open coding it.
      - In update_console_cmdline(), drop a NUL-termination assignment;
        the strlcpy() call that precedes it guarantees it's not needed.
      - Simplify some logic in printk_timed_ratelimit().
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Reviewed-by: default avatarPetr Mladek <pmladek@suse.cz>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: Jan Kara <jack@suse.cz>
    Cc: John Stultz <john.stultz@linaro.org>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    249771b8
printk.c 75.7 KB