net/caif: Use pr_fmt

This patch standardizes caif message logging prefixes.

Add #define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__
Add missing "\n"s to some logging messages
Convert pr_warning to pr_warn

This changes the logging message prefix from CAIF: to caif:
for all uses but caif_socket.c and chnl_net.c.  Those now use
their filename without extension.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Joe Perches
2010-09-05 21:31:11 +00:00
committed by David S. Miller
parent a0ece28539
commit b31fa5bad5
16 changed files with 167 additions and 181 deletions
+8 -6
View File
@@ -3,6 +3,9 @@
* Author: Sjur Brendeland/sjur.brandeland@stericsson.com
* License terms: GNU General Public License (GPL) version 2
*/
#define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__
#include <linux/stddef.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
@@ -190,7 +193,7 @@ static int cfmuxl_receive(struct cflayer *layr, struct cfpkt *pkt)
u8 id;
struct cflayer *up;
if (cfpkt_extr_head(pkt, &id, 1) < 0) {
pr_err("CAIF: %s(): erroneous Caif Packet\n", __func__);
pr_err("erroneous Caif Packet\n");
cfpkt_destroy(pkt);
return -EPROTO;
}
@@ -199,8 +202,8 @@ static int cfmuxl_receive(struct cflayer *layr, struct cfpkt *pkt)
up = get_up(muxl, id);
spin_unlock(&muxl->receive_lock);
if (up == NULL) {
pr_info("CAIF: %s():Received data on unknown link ID = %d "
"(0x%x) up == NULL", __func__, id, id);
pr_info("Received data on unknown link ID = %d (0x%x) up == NULL",
id, id);
cfpkt_destroy(pkt);
/*
* Don't return ERROR, since modem misbehaves and sends out
@@ -223,9 +226,8 @@ static int cfmuxl_transmit(struct cflayer *layr, struct cfpkt *pkt)
struct caif_payload_info *info = cfpkt_info(pkt);
dn = get_dn(muxl, cfpkt_info(pkt)->dev_info);
if (dn == NULL) {
pr_warning("CAIF: %s(): Send data on unknown phy "
"ID = %d (0x%x)\n",
__func__, info->dev_info->id, info->dev_info->id);
pr_warn("Send data on unknown phy ID = %d (0x%x)\n",
info->dev_info->id, info->dev_info->id);
return -ENOTCONN;
}
info->hdr_len += 1;