It decreases code size as well:
textdata bss dec hex filename
15767 0 8 157753d9f lib/vsprintf.o-before
15735 0 8 157433d7f lib/vsprintf.o-TOLOWER
Signed-off-by: André Goddard Rosa
Acked-by: Frederic Weisbecker
---
lib/vsprintf.c
, making it redundant. In other words,
"a char equals zero is never a space".
Signed-off-by: André Goddard Rosa
---
arch/s390/kernel/debug.c |3 +-
arch/um/drivers/mconsole_kern.c | 16 ++
arch/x86/kernel/cpu/mtrr/if.c | 11 +++--
dri
Most relevant complaints were addressed.
Signed-off-by: André Goddard Rosa
Acked-by: Frederic Weisbecker
---
lib/vsprintf.c | 186 ++--
1 files changed, 99 insertions(+), 87 deletions(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index
ction
v3: improved comments on patch 5/7 and factorize a switch statement on 6/7
as per suggestions from Ingo and Frederic (thanks!)
v2: addressed feedback from Frederic Weisbecker review (thanks!!)
and split into separate patches
v1: original submission
André Goddard Rosa (12):
vsp
urnal.com/15119.html
Signed-off-by: André Goddard Rosa
Acked-by: Frederic Weisbecker
---
lib/vsprintf.c | 10 ++
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 33bed5e..002f462 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -34,6 +34
While at it, use tabs to indent the comments.
Signed-off-by: André Goddard Rosa
---
include/linux/ctype.h |2 +-
lib/ctype.c | 50
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/include/linux/ctype.h b/include
f lib/vsprintf.o-after
Signed-off-by: André Goddard Rosa
Acked-by: Ingo Molnar
---
lib/vsprintf.c | 48 ++--
1 files changed, 14 insertions(+), 34 deletions(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 566c947..7ec96a3 100644
--- a/lib/vsprintf.c
It decreases code size:
textdata bss dec hex filename
15719 0 8 157273d6f lib/vsprintf.o-before
15543 0 8 155513cbf lib/vsprintf.o-after
Signed-off-by: André Goddard Rosa
Acked-by: Frederic Weisbecker
---
lib/vsprintf.c | 19
Cleanup by moving variables closer to the scope where they're used in fact.
Also, remove unneeded ones.
Signed-off-by: André Goddard Rosa
Acked-by: Frederic Weisbecker
---
lib/vsprintf.c | 64 ---
1 files changed, 28 insertions(+
Signed-off-by: André Goddard Rosa
Acked-by: Frederic Weisbecker
---
lib/vsprintf.c | 10 ++
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 002f462..403e835 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1445,13 +1445,15 @@ do
Hi, James!
On Sun, Nov 8, 2009 at 2:05 PM, James Bottomley
wrote:
> On Sat, 2009-11-07 at 13:16 -0200, André Goddard Rosa wrote:
>> This patch reduces lib.a code size by 173 bytes on my Core 2 with gcc 4.4.1
>> even considering that it exports a newly defined function skip_spaces(
quals zero is never a space". So remove this check.
Also, *s != 0 is by far the most common case (non-empty string).
Signed-off-by: André Goddard Rosa
---
include/linux/string.h |1 +
lib/string.c | 19 +++
2 files changed, 16 insertions(+), 4 deletions(-)
re
15719 0 8 157273d6f lib/vsprintf.o-minus-double-check
Signed-off-by: André Goddard Rosa
Acked-by: Frederic Weisbecker
---
lib/vsprintf.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 14e4197..af79152 100644
... so that strlen() iterates over a smaller string comprising of the
remaining characters only.
Signed-off-by: André Goddard Rosa
---
lib/string.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/string.c b/lib/string.c
index d9a51d5..cf86eab 100644
--- a/lib
14 matches
Mail list logo