Staging
v0.5.1
https://github.com/torvalds/linux
Revision 21f644f3eabde637f255f75ad05d0821a7a36b7f authored by David S. Miller on 08 April 2008, 23:50:44 UTC, committed by David S. Miller on 08 April 2008, 23:50:44 UTC
If print_mac() is used inside of a pr_debug() the compiler
can't see that the call is redundant so still performs it
even of pr_debug() ends up being a nop.

So don't use print_mac() in such cases in hot code paths,
use MAC_FMT et al. instead.

As noted by Joe Perches, pr_debug() could be modified to
handle this better, but that is a change to an interface
used by the entire kernel and thus needs to be validated
carefully.  This here is thus the less risky fix for
2.6.25

Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6adb4f7
History
Tip revision: 21f644f3eabde637f255f75ad05d0821a7a36b7f authored by David S. Miller on 08 April 2008, 23:50:44 UTC
[NET]: Undo code bloat in hot paths due to print_mac().
Tip revision: 21f644f
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 644 bytes
.mailmap -rw-r--r-- 3.6 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 90.4 KB
Kbuild -rw-r--r-- 1.6 KB
MAINTAINERS -rw-r--r-- 94.9 KB
Makefile -rw-r--r-- 52.8 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top