diff options
author | Joe Perches <joe@perches.com> | 2011-11-28 13:40:46 -0500 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2012-01-05 11:51:44 -0500 |
commit | 5d3851530d6d68564e4e0ce04d0547d4d106fc72 (patch) | |
tree | d47065fcc1f93f00070afe597a98ab185fd13859 /net/9p/error.c | |
parent | a0ea787b027b79cf2e01c6758e5246db06520158 (diff) |
9p: Reduce object size with CONFIG_NET_9P_DEBUG
Reduce object size by deduplicating formats.
Use vsprintf extension %pV.
Rename P9_DPRINTK uses to p9_debug, align arguments.
Add function for _p9_debug and macro to add __func__.
Add missing "\n"s to p9_debug uses.
Remove embedded function names as p9_debug adds it.
Remove P9_EPRINTK macro and convert use to pr_<level>.
Add and use pr_fmt and pr_<level>.
$ size fs/9p/built-in.o*
text data bss dec hex filename
62133 984 16000 79117 1350d fs/9p/built-in.o.new
67342 984 16928 85254 14d06 fs/9p/built-in.o.old
$ size net/9p/built-in.o*
text data bss dec hex filename
88792 4148 22024 114964 1c114 net/9p/built-in.o.new
94072 4148 23232 121452 1da6c net/9p/built-in.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p/error.c')
-rw-r--r-- | net/9p/error.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/9p/error.c b/net/9p/error.c index 52518512a93e..2ab2de76010f 100644 --- a/net/9p/error.c +++ b/net/9p/error.c | |||
@@ -27,6 +27,8 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
31 | |||
30 | #include <linux/module.h> | 32 | #include <linux/module.h> |
31 | #include <linux/list.h> | 33 | #include <linux/list.h> |
32 | #include <linux/jhash.h> | 34 | #include <linux/jhash.h> |
@@ -237,8 +239,8 @@ int p9_errstr2errno(char *errstr, int len) | |||
237 | if (errno == 0) { | 239 | if (errno == 0) { |
238 | /* TODO: if error isn't found, add it dynamically */ | 240 | /* TODO: if error isn't found, add it dynamically */ |
239 | errstr[len] = 0; | 241 | errstr[len] = 0; |
240 | printk(KERN_ERR "%s: server reported unknown error %s\n", | 242 | pr_err("%s: server reported unknown error %s\n", |
241 | __func__, errstr); | 243 | __func__, errstr); |
242 | errno = ESERVERFAULT; | 244 | errno = ESERVERFAULT; |
243 | } | 245 | } |
244 | 246 | ||