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
apparmor
integrity
keys
selinux
smack
tomoyo
yama
Kconfig -rw-r--r-- 5.7 KB
Makefile -rw-r--r-- 1.0 KB
capability.c -rw-r--r-- 23.3 KB
commoncap.c -rw-r--r-- 27.9 KB
device_cgroup.c -rw-r--r-- 11.3 KB
inode.c -rw-r--r-- 6.7 KB
lsm_audit.c -rw-r--r-- 9.3 KB
min_addr.c -rw-r--r-- 1.3 KB
security.c -rw-r--r-- 33.9 KB

back to top