diff options
author | Joe Perches <joe@perches.com> | 2013-05-04 23:12:25 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-05-04 23:17:23 -0400 |
commit | f96637be081141d6f8813429499f164260b49d70 (patch) | |
tree | c91f5a9b5a2b7a67bbeda15d7c9805655547a098 /fs/cifs/dns_resolve.c | |
parent | f7f7c1850eb98da758731ea7edfa830ebefe24cd (diff) |
[CIFS] cifs: Rename cERROR and cFYI to cifs_dbg
It's not obvious from reading the macro names that these macros
are for debugging. Convert the names to a single more typical
kernel style cifs_dbg macro.
cERROR(1, ...) -> cifs_dbg(VFS, ...)
cFYI(1, ...) -> cifs_dbg(FYI, ...)
cFYI(DBG2, ...) -> cifs_dbg(NOISY, ...)
Move the terminating format newline from the macro to the call site.
Add CONFIG_CIFS_DEBUG function cifs_vfs_err to emit the
"CIFS VFS: " prefix for VFS messages.
Size is reduced ~ 1% when CONFIG_CIFS_DEBUG is set (default y)
$ size fs/cifs/cifs.ko*
text data bss dec hex filename
265245 2525 132 267902 4167e fs/cifs/cifs.ko.new
268359 2525 132 271016 422a8 fs/cifs/cifs.ko.old
Other miscellaneous changes around these conversions:
o Miscellaneous typo fixes
o Add terminating \n's to almost all formats and remove them
from the macros to be more kernel style like. A few formats
previously had defective \n's
o Remove unnecessary OOM messages as kmalloc() calls dump_stack
o Coalesce formats to make grep easier,
added missing spaces when coalescing formats
o Use %s, __func__ instead of embedded function name
o Removed unnecessary "cifs: " prefixes
o Convert kzalloc with multiply to kcalloc
o Remove unused cifswarn macro
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/dns_resolve.c')
-rw-r--r-- | fs/cifs/dns_resolve.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/cifs/dns_resolve.c b/fs/cifs/dns_resolve.c index 1d2d91d9bf65..e7512e497611 100644 --- a/fs/cifs/dns_resolve.c +++ b/fs/cifs/dns_resolve.c | |||
@@ -55,7 +55,7 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr) | |||
55 | 55 | ||
56 | len = strlen(unc); | 56 | len = strlen(unc); |
57 | if (len < 3) { | 57 | if (len < 3) { |
58 | cFYI(1, "%s: unc is too short: %s", __func__, unc); | 58 | cifs_dbg(FYI, "%s: unc is too short: %s\n", __func__, unc); |
59 | return -EINVAL; | 59 | return -EINVAL; |
60 | } | 60 | } |
61 | 61 | ||
@@ -68,8 +68,8 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr) | |||
68 | if (sep) | 68 | if (sep) |
69 | len = sep - hostname; | 69 | len = sep - hostname; |
70 | else | 70 | else |
71 | cFYI(1, "%s: probably server name is whole unc: %s", | 71 | cifs_dbg(FYI, "%s: probably server name is whole unc: %s\n", |
72 | __func__, unc); | 72 | __func__, unc); |
73 | 73 | ||
74 | /* Try to interpret hostname as an IPv4 or IPv6 address */ | 74 | /* Try to interpret hostname as an IPv4 or IPv6 address */ |
75 | rc = cifs_convert_address((struct sockaddr *)&ss, hostname, len); | 75 | rc = cifs_convert_address((struct sockaddr *)&ss, hostname, len); |
@@ -79,11 +79,11 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr) | |||
79 | /* Perform the upcall */ | 79 | /* Perform the upcall */ |
80 | rc = dns_query(NULL, hostname, len, NULL, ip_addr, NULL); | 80 | rc = dns_query(NULL, hostname, len, NULL, ip_addr, NULL); |
81 | if (rc < 0) | 81 | if (rc < 0) |
82 | cFYI(1, "%s: unable to resolve: %*.*s", | 82 | cifs_dbg(FYI, "%s: unable to resolve: %*.*s\n", |
83 | __func__, len, len, hostname); | 83 | __func__, len, len, hostname); |
84 | else | 84 | else |
85 | cFYI(1, "%s: resolved: %*.*s to %s", | 85 | cifs_dbg(FYI, "%s: resolved: %*.*s to %s\n", |
86 | __func__, len, len, hostname, *ip_addr); | 86 | __func__, len, len, hostname, *ip_addr); |
87 | return rc; | 87 | return rc; |
88 | 88 | ||
89 | name_is_IP_address: | 89 | name_is_IP_address: |
@@ -92,7 +92,8 @@ name_is_IP_address: | |||
92 | return -ENOMEM; | 92 | return -ENOMEM; |
93 | memcpy(name, hostname, len); | 93 | memcpy(name, hostname, len); |
94 | name[len] = 0; | 94 | name[len] = 0; |
95 | cFYI(1, "%s: unc is IP, skipping dns upcall: %s", __func__, name); | 95 | cifs_dbg(FYI, "%s: unc is IP, skipping dns upcall: %s\n", |
96 | __func__, name); | ||
96 | *ip_addr = name; | 97 | *ip_addr = name; |
97 | return 0; | 98 | return 0; |
98 | } | 99 | } |