]> git.baikalelectronics.ru Git - kernel.git/commit
printk: split out core logging code into helper function
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 9 Oct 2016 05:02:09 +0000 (22:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 9 Oct 2016 19:23:39 +0000 (12:23 -0700)
commita738572636490be31c4b6a267439746a6967fdda
tree63d9f21344d5552a844688be4a4979e5847804dd
parent1262300e7eb5ec193eb1ea7c59ee19e60cf70964
printk: split out core logging code into helper function

The code that actually decides how to log the message (whether to put it
directly into the record log, whether to append it to an existing
buffered log, or whether to start a new buffered log) is fairly
non-obvious code in the middle of the vprintk_emit() function.

Splitting that code up into a helper function makes it easier to
understand, but perhaps more importantly also allows for the code to
just return early out of the helper function once it has made the
decision about where the new log content goes.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/printk/printk.c