diff options
author | Joe Perches <joe@perches.com> | 2010-04-20 23:50:45 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-04-20 23:50:45 -0400 |
commit | b6b38f704a8193daba520493ebdaf7e819962fc8 (patch) | |
tree | c38f4557b51b33573e36817888afa2accf3da9ca /fs/cifs/dns_resolve.c | |
parent | 315e995c63a15cb4d4efdbfd70fe2db191917f7a (diff) |
[CIFS] Neaten cERROR and cFYI macros, reduce text space
Neaten cERROR and cFYI macros, reduce text space
~2.5K
Convert '__FILE__ ": " fmt' to '"%s: " fmt', __FILE__' to save text space
Surround macros with do {} while
Add parentheses to macros
Make statement expression macro from macro with assign
Remove now unnecessary parentheses from cFYI and cERROR uses
defconfig with CIFS support old
$ size fs/cifs/built-in.o
text data bss dec hex filename
156012 1760 148 157920 268e0 fs/cifs/built-in.o
defconfig with CIFS support old
$ size fs/cifs/built-in.o
text data bss dec hex filename
153508 1760 148 155416 25f18 fs/cifs/built-in.o
allyesconfig old:
$ size fs/cifs/built-in.o
text data bss dec hex filename
309138 3864 74824 387826 5eaf2 fs/cifs/built-in.o
allyesconfig new
$ size fs/cifs/built-in.o
text data bss dec hex filename
305655 3864 74824 384343 5dd57 fs/cifs/built-in.o
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/dns_resolve.c')
-rw-r--r-- | fs/cifs/dns_resolve.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/cifs/dns_resolve.c b/fs/cifs/dns_resolve.c index 6f8a0e3fb25b..4db2c5e7283f 100644 --- a/fs/cifs/dns_resolve.c +++ b/fs/cifs/dns_resolve.c | |||
@@ -106,14 +106,14 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr) | |||
106 | /* search for server name delimiter */ | 106 | /* search for server name delimiter */ |
107 | len = strlen(unc); | 107 | len = strlen(unc); |
108 | if (len < 3) { | 108 | if (len < 3) { |
109 | cFYI(1, ("%s: unc is too short: %s", __func__, unc)); | 109 | cFYI(1, "%s: unc is too short: %s", __func__, unc); |
110 | return -EINVAL; | 110 | return -EINVAL; |
111 | } | 111 | } |
112 | len -= 2; | 112 | len -= 2; |
113 | name = memchr(unc+2, '\\', len); | 113 | name = memchr(unc+2, '\\', len); |
114 | if (!name) { | 114 | if (!name) { |
115 | cFYI(1, ("%s: probably server name is whole unc: %s", | 115 | cFYI(1, "%s: probably server name is whole unc: %s", |
116 | __func__, unc)); | 116 | __func__, unc); |
117 | } else { | 117 | } else { |
118 | len = (name - unc) - 2/* leading // */; | 118 | len = (name - unc) - 2/* leading // */; |
119 | } | 119 | } |
@@ -127,8 +127,8 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr) | |||
127 | name[len] = 0; | 127 | name[len] = 0; |
128 | 128 | ||
129 | if (is_ip(name)) { | 129 | if (is_ip(name)) { |
130 | cFYI(1, ("%s: it is IP, skipping dns upcall: %s", | 130 | cFYI(1, "%s: it is IP, skipping dns upcall: %s", |
131 | __func__, name)); | 131 | __func__, name); |
132 | data = name; | 132 | data = name; |
133 | goto skip_upcall; | 133 | goto skip_upcall; |
134 | } | 134 | } |
@@ -138,7 +138,7 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr) | |||
138 | len = rkey->type_data.x[0]; | 138 | len = rkey->type_data.x[0]; |
139 | data = rkey->payload.data; | 139 | data = rkey->payload.data; |
140 | } else { | 140 | } else { |
141 | cERROR(1, ("%s: unable to resolve: %s", __func__, name)); | 141 | cERROR(1, "%s: unable to resolve: %s", __func__, name); |
142 | goto out; | 142 | goto out; |
143 | } | 143 | } |
144 | 144 | ||
@@ -148,10 +148,10 @@ skip_upcall: | |||
148 | if (*ip_addr) { | 148 | if (*ip_addr) { |
149 | memcpy(*ip_addr, data, len + 1); | 149 | memcpy(*ip_addr, data, len + 1); |
150 | if (!IS_ERR(rkey)) | 150 | if (!IS_ERR(rkey)) |
151 | cFYI(1, ("%s: resolved: %s to %s", __func__, | 151 | cFYI(1, "%s: resolved: %s to %s", __func__, |
152 | name, | 152 | name, |
153 | *ip_addr | 153 | *ip_addr |
154 | )); | 154 | ); |
155 | rc = 0; | 155 | rc = 0; |
156 | } else { | 156 | } else { |
157 | rc = -ENOMEM; | 157 | rc = -ENOMEM; |