]> git.baikalelectronics.ru Git - kernel.git/commit
printk: split message size computation
authorPetr Mladek <pmladek@suse.cz>
Wed, 4 Jun 2014 23:11:31 +0000 (16:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:54:16 +0000 (16:54 -0700)
commit3b42c1342db5ccc3deb177b45df67c7be7433db6
treedd1ad8eb2e43fa09bb06cfff67bd13a6016dc5a0
parent21977062c5011051d7779c6fc3821488740d6d9f
printk: split message size computation

We will want to recompute the message size when shrinking too long
messages.  Let's put the code into separate function.

The side effect of setting "pad_len" is not nice but it is worth removing
the code duplication.  Note that I will probably have one more usage for
this function when handling messages safe way in NMI context.

This patch does not change the existing behavior.

Signed-off-by: Petr Mladek <pmladek@suse.cz>
Cc: Jan Kara <jack@suse.cz>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Kay Sievers <kay@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/printk/printk.c