diff options
| author | Joe Perches <[email protected]> | 2015-09-09 22:36:09 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2015-09-10 20:29:01 +0000 |
| commit | 52aa8536f8f41367d5f2938ad67aa87957e70010 (patch) | |
| tree | 55070d401000b7ab501b3b4a51883401f3a8adc3 /lib/bitmap.c | |
| parent | kernel/extable.c: remove duplicated include (diff) | |
| download | kernel-52aa8536f8f41367d5f2938ad67aa87957e70010.tar.gz kernel-52aa8536f8f41367d5f2938ad67aa87957e70010.zip | |
kernel/cred.c: remove unnecessary kdebug atomic reads
Commit e0e817392b9a ("CRED: Add some configurable debugging [try #6]")
added the kdebug mechanism to this file back in 2009.
The kdebug macro calls no_printk which always evaluates arguments.
Most of the kdebug uses have an unnecessary call of
atomic_read(&cred->usage)
Make the kdebug macro do nothing by defining it with
do { if (0) no_printk(...); } while (0)
when not enabled.
$ size kernel/cred.o* (defconfig x86-64)
text data bss dec hex filename
2748 336 8 3092 c14 kernel/cred.o.new
2788 336 8 3132 c3c kernel/cred.o.old
Miscellanea:
o Neaten the #define kdebug macros while there
Signed-off-by: Joe Perches <[email protected]>
Cc: David Howells <[email protected]>
Cc: James Morris <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/bitmap.c')
0 files changed, 0 insertions, 0 deletions
