]> git.karo-electronics.de Git - karo-tx-linux.git/commit
printk: split message size computation
authorPetr Mladek <pmladek@suse.cz>
Thu, 22 May 2014 00:43:33 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:43:33 +0000 (10:43 +1000)
commit0d8db5627bead4d29b1af1434c2a72ba3f9cc16a
tree00be2ee8fa4d9cd7d4e843cd430517212c68c1a0
parent14350114668562b6b81eff7212533221b022af81
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>
kernel/printk/printk.c