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>
This commit is contained in:

committed by
Paul Gortmaker

parent
f705ab956b
commit
2cf8aa19fe
@@ -161,7 +161,7 @@ void tipc_named_publish(struct publication *publ)
|
||||
|
||||
buf = named_prepare_buf(PUBLICATION, ITEM_SIZE, 0);
|
||||
if (!buf) {
|
||||
warn("Publication distribution failure\n");
|
||||
pr_warn("Publication distribution failure\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ void tipc_named_withdraw(struct publication *publ)
|
||||
|
||||
buf = named_prepare_buf(WITHDRAWAL, ITEM_SIZE, 0);
|
||||
if (!buf) {
|
||||
warn("Withdrawal distribution failure\n");
|
||||
pr_warn("Withdrawal distribution failure\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ static void named_distribute(struct list_head *message_list, u32 node,
|
||||
rest -= left;
|
||||
buf = named_prepare_buf(PUBLICATION, left, node);
|
||||
if (!buf) {
|
||||
warn("Bulk publication failure\n");
|
||||
pr_warn("Bulk publication failure\n");
|
||||
return;
|
||||
}
|
||||
item = (struct distr_item *)msg_data(buf_msg(buf));
|
||||
@@ -283,9 +283,10 @@ static void named_purge_publ(struct publication *publ)
|
||||
write_unlock_bh(&tipc_nametbl_lock);
|
||||
|
||||
if (p != publ) {
|
||||
err("Unable to remove publication from failed node\n"
|
||||
"(type=%u, lower=%u, node=0x%x, ref=%u, key=%u)\n",
|
||||
publ->type, publ->lower, publ->node, publ->ref, publ->key);
|
||||
pr_err("Unable to remove publication from failed node\n"
|
||||
" (type=%u, lower=%u, node=0x%x, ref=%u, key=%u)\n",
|
||||
publ->type, publ->lower, publ->node, publ->ref,
|
||||
publ->key);
|
||||
}
|
||||
|
||||
kfree(p);
|
||||
@@ -329,14 +330,14 @@ void tipc_named_recv(struct sk_buff *buf)
|
||||
tipc_nodesub_unsubscribe(&publ->subscr);
|
||||
kfree(publ);
|
||||
} else {
|
||||
err("Unable to remove publication by node 0x%x\n"
|
||||
"(type=%u, lower=%u, ref=%u, key=%u)\n",
|
||||
msg_orignode(msg),
|
||||
ntohl(item->type), ntohl(item->lower),
|
||||
ntohl(item->ref), ntohl(item->key));
|
||||
pr_err("Unable to remove publication by node 0x%x\n"
|
||||
" (type=%u, lower=%u, ref=%u, key=%u)\n",
|
||||
msg_orignode(msg), ntohl(item->type),
|
||||
ntohl(item->lower), ntohl(item->ref),
|
||||
ntohl(item->key));
|
||||
}
|
||||
} else {
|
||||
warn("Unrecognized name table message received\n");
|
||||
pr_warn("Unrecognized name table message received\n");
|
||||
}
|
||||
item++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user