diff options
author | Erik Hugne <erik.hugne@ericsson.com> | 2012-06-29 00:16:37 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-07-13 19:24:44 -0400 |
commit | 2cf8aa19fe8bec578b707daa383ebff80e3f81a1 (patch) | |
tree | bd800510d0e01d441e25dd476228462106eaa9ea /net/tipc/ref.c | |
parent | f705ab956b3a0377181c9d73b235ad5bf4020937 (diff) |
tipc: use standard printk shortcut macros (pr_err etc.)
All messages should go directly to the kernel log. The TIPC
specific error, warning, info and debug trace macro's are
removed and all references replaced with pr_err, pr_warn,
pr_info and pr_debug.
Commonly used sub-strings are explicitly declared as a const
char to reduce .text size.
Note that this means the debug messages (changed to pr_debug),
are now enabled through dynamic debugging, instead of a TIPC
specific Kconfig option (TIPC_DEBUG). The latter will be
phased out completely
Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
[PG: use pr_fmt as suggested by Joe Perches <joe@perches.com>]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/ref.c')
-rw-r--r-- | net/tipc/ref.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/tipc/ref.c b/net/tipc/ref.c index 5cada0e38e03..2a2a938dc22c 100644 --- a/net/tipc/ref.c +++ b/net/tipc/ref.c | |||
@@ -153,11 +153,11 @@ u32 tipc_ref_acquire(void *object, spinlock_t **lock) | |||
153 | struct reference *entry = NULL; | 153 | struct reference *entry = NULL; |
154 | 154 | ||
155 | if (!object) { | 155 | if (!object) { |
156 | err("Attempt to acquire reference to non-existent object\n"); | 156 | pr_err("Attempt to acquire ref. to non-existent obj\n"); |
157 | return 0; | 157 | return 0; |
158 | } | 158 | } |
159 | if (!tipc_ref_table.entries) { | 159 | if (!tipc_ref_table.entries) { |
160 | err("Reference table not found during acquisition attempt\n"); | 160 | pr_err("Ref. table not found in acquisition attempt\n"); |
161 | return 0; | 161 | return 0; |
162 | } | 162 | } |
163 | 163 | ||
@@ -211,7 +211,7 @@ void tipc_ref_discard(u32 ref) | |||
211 | u32 index_mask; | 211 | u32 index_mask; |
212 | 212 | ||
213 | if (!tipc_ref_table.entries) { | 213 | if (!tipc_ref_table.entries) { |
214 | err("Reference table not found during discard attempt\n"); | 214 | pr_err("Ref. table not found during discard attempt\n"); |
215 | return; | 215 | return; |
216 | } | 216 | } |
217 | 217 | ||
@@ -222,11 +222,11 @@ void tipc_ref_discard(u32 ref) | |||
222 | write_lock_bh(&ref_table_lock); | 222 | write_lock_bh(&ref_table_lock); |
223 | 223 | ||
224 | if (!entry->object) { | 224 | if (!entry->object) { |
225 | err("Attempt to discard reference to non-existent object\n"); | 225 | pr_err("Attempt to discard ref. to non-existent obj\n"); |
226 | goto exit; | 226 | goto exit; |
227 | } | 227 | } |
228 | if (entry->ref != ref) { | 228 | if (entry->ref != ref) { |
229 | err("Attempt to discard non-existent reference\n"); | 229 | pr_err("Attempt to discard non-existent reference\n"); |
230 | goto exit; | 230 | goto exit; |
231 | } | 231 | } |
232 | 232 | ||