https://github.com/torvalds/linux
Revision d36208227d03c44c0a74cd702cc94528162e1703 authored by Steven Rostedt on 29 June 2012, 15:40:11 UTC, committed by Greg Kroah-Hartman on 29 June 2012, 20:55:35 UTC
In reviewing Kay's fix up patch: "printk: Have printk() never buffer its
data", I found two if statements that could be combined and optimized.

Put together the two 'cont.len && cont.owner == current' if statements
into a single one, and check if we need to call cont_add(). This also
removes the unneeded double cont_flush() calls.

Link: http://lkml.kernel.org/r/1340869133.876.10.camel@mop

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Kay Sievers <kay@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 084681d
History
Tip revision: d36208227d03c44c0a74cd702cc94528162e1703 authored by Steven Rostedt on 29 June 2012, 15:40:11 UTC
printk: Optimize if statement logic where newline exists
Tip revision: d362082
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1014 bytes
.mailmap -rw-r--r-- 4.4 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 92.7 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 208.2 KB
Makefile -rw-r--r-- 46.0 KB
README -rw-r--r-- 17.3 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top