]> git.karo-electronics.de Git - karo-tx-linux.git/commit
printk: create pr_<level> functions
authorJoe Perches <joe@perches.com>
Tue, 2 Aug 2016 21:03:53 +0000 (14:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Aug 2016 23:35:04 +0000 (19:35 -0400)
commit874f9c7da9a4acbc1b9e12ca722579fb50e4d142
treea0a327d2092edfc20c453d3f9858633a5369548a
parentbebca05281d039e4144e1c51f402fd1d5f54b5e2
printk: create pr_<level> functions

Using functions instead of macros can reduce overall code size by
eliminating unnecessary "KERN_SOH<digit>" prefixes from format strings.

  defconfig x86-64:

  $ size vmlinux*
     text    data     bss      dec     hex  filename
  10193570 4331464 1105920 15630954  ee826a vmlinux.new
  10192623 4335560 1105920 15634103  ee8eb7 vmlinux.old

As the return value are unimportant and unused in the kernel tree, these
new functions return void.

Miscellanea:

 - change pr_<level> macros to call new __pr_<level> functions
 - change vprintk_nmi and vprintk_default to add LOGLEVEL_<level> argument

[akpm@linux-foundation.org: fix LOGLEVEL_INFO, per Joe]
Link: http://lkml.kernel.org/r/e16cc34479dfefcae37c98b481e6646f0f69efc3.1466718827.git.joe@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/printk.h
kernel/printk/internal.h
kernel/printk/nmi.c
kernel/printk/printk.c