16 Dec, 2009
1 commit
-
Makes use of skip_spaces() defined in lib/string.c for removing leading
spaces from strings all over the tree.It decreases lib.a code size by 47 bytes and reuses the function tree-wide:
text data bss dec hex filename
64688 584 592 65864 10148 (TOTALS-BEFORE)
64641 584 592 65817 10119 (TOTALS-AFTER)Also, while at it, if we see (*str && isspace(*str)), we can be sure to
remove the first condition (*str) as the second one (isspace(*str)) also
evaluates to 0 whenever *str == 0, making it redundant. In other words,
"a char equals zero is never a space".Julia Lawall tried the semantic patch (http://coccinelle.lip6.fr) below,
and found occurrences of this pattern on 3 more files:
drivers/leds/led-class.c
drivers/leds/ledtrig-timer.c
drivers/video/output.c@@
expression str;
@@( // ignore skip_spaces cases
while (*str && isspace(*str)) { \(str++;\|++str;\) }
|
- *str &&
isspace(*str)
)Signed-off-by: André Goddard Rosa
Cc: Julia Lawall
Cc: Martin Schwidefsky
Cc: Jeff Dike
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: "H. Peter Anvin"
Cc: Richard Purdie
Cc: Neil Brown
Cc: Kyle McMartin
Cc: Henrique de Moraes Holschuh
Cc: David Howells
Cc:
Cc: Samuel Ortiz
Cc: Patrick McHardy
Cc: Takashi Iwai
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Jul, 2009
1 commit
-
The member was intended, not the local variable.
Signed-off-by: Roel Kluin
Cc: Jason Baron
Cc: Greg Banks
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman
25 Mar, 2009
2 commits
-
Allow simple quoting of words in the dynamic debug control language.
This allows more natural specification when using the control language
to match against printk formats, e.g#echo -n 'format "Setting node for non-present cpu" +p' >
/mnt/debugfs/dynamic_debug/controlinstead of
#echo -n 'format Setting\040node\040for\040non-present\040cpu +p' >
/mnt/debugfs/dynamic_debug/controlAdjust the dynamic debug documention to describe that and provide a
new example. Adjust the existing examples in the documentation to
reflect the current whitespace escaping behaviour when reading the
control file. Fix some minor documentation trailing whitespace.Signed-off-by: Greg Banks
Acked-by: Jason Baron
Signed-off-by: Greg Kroah-Hartman -
This patch combines Greg Bank's dprintk() work with the existing dynamic
printk patchset, we are now calling it 'dynamic debug'.The new feature of this patchset is a richer /debugfs control file interface,
(an example output from my system is at the bottom), which allows fined grained
control over the the debug output. The output can be controlled by function,
file, module, format string, and line number.for example, enabled all debug messages in module 'nf_conntrack':
echo -n 'module nf_conntrack +p' > /mnt/debugfs/dynamic_debug/control
to disable them:
echo -n 'module nf_conntrack -p' > /mnt/debugfs/dynamic_debug/control
A further explanation can be found in the documentation patch.
Signed-off-by: Greg Banks
Signed-off-by: Jason Baron
Signed-off-by: Greg Kroah-Hartman