diff options
author | Joe Perches <joe@perches.com> | 2010-09-05 17:31:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-06 21:48:43 -0400 |
commit | b31fa5bad576cd8180a5ad70c648333b44320d44 (patch) | |
tree | b31239e8828e7e5b36ef85a0715ababc4f556e42 /net/caif/cfmuxl.c | |
parent | a0ece28539d49c9bdcc6da0bbb26771dceb57581 (diff) |
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>
Diffstat (limited to 'net/caif/cfmuxl.c')
-rw-r--r-- | net/caif/cfmuxl.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/caif/cfmuxl.c b/net/caif/cfmuxl.c index 80c8d332b258..46f34b2e0478 100644 --- a/net/caif/cfmuxl.c +++ b/net/caif/cfmuxl.c | |||
@@ -3,6 +3,9 @@ | |||
3 | * Author: Sjur Brendeland/sjur.brandeland@stericsson.com | 3 | * Author: Sjur Brendeland/sjur.brandeland@stericsson.com |
4 | * License terms: GNU General Public License (GPL) version 2 | 4 | * License terms: GNU General Public License (GPL) version 2 |
5 | */ | 5 | */ |
6 | |||
7 | #define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__ | ||
8 | |||
6 | #include <linux/stddef.h> | 9 | #include <linux/stddef.h> |
7 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
8 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
@@ -190,7 +193,7 @@ static int cfmuxl_receive(struct cflayer *layr, struct cfpkt *pkt) | |||
190 | u8 id; | 193 | u8 id; |
191 | struct cflayer *up; | 194 | struct cflayer *up; |
192 | if (cfpkt_extr_head(pkt, &id, 1) < 0) { | 195 | if (cfpkt_extr_head(pkt, &id, 1) < 0) { |
193 | pr_err("CAIF: %s(): erroneous Caif Packet\n", __func__); | 196 | pr_err("erroneous Caif Packet\n"); |
194 | cfpkt_destroy(pkt); | 197 | cfpkt_destroy(pkt); |
195 | return -EPROTO; | 198 | return -EPROTO; |
196 | } | 199 | } |
@@ -199,8 +202,8 @@ static int cfmuxl_receive(struct cflayer *layr, struct cfpkt *pkt) | |||
199 | up = get_up(muxl, id); | 202 | up = get_up(muxl, id); |
200 | spin_unlock(&muxl->receive_lock); | 203 | spin_unlock(&muxl->receive_lock); |
201 | if (up == NULL) { | 204 | if (up == NULL) { |
202 | pr_info("CAIF: %s():Received data on unknown link ID = %d " | 205 | pr_info("Received data on unknown link ID = %d (0x%x) up == NULL", |
203 | "(0x%x) up == NULL", __func__, id, id); | 206 | id, id); |
204 | cfpkt_destroy(pkt); | 207 | cfpkt_destroy(pkt); |
205 | /* | 208 | /* |
206 | * Don't return ERROR, since modem misbehaves and sends out | 209 | * Don't return ERROR, since modem misbehaves and sends out |
@@ -223,9 +226,8 @@ static int cfmuxl_transmit(struct cflayer *layr, struct cfpkt *pkt) | |||
223 | struct caif_payload_info *info = cfpkt_info(pkt); | 226 | struct caif_payload_info *info = cfpkt_info(pkt); |
224 | dn = get_dn(muxl, cfpkt_info(pkt)->dev_info); | 227 | dn = get_dn(muxl, cfpkt_info(pkt)->dev_info); |
225 | if (dn == NULL) { | 228 | if (dn == NULL) { |
226 | pr_warning("CAIF: %s(): Send data on unknown phy " | 229 | pr_warn("Send data on unknown phy ID = %d (0x%x)\n", |
227 | "ID = %d (0x%x)\n", | 230 | info->dev_info->id, info->dev_info->id); |
228 | __func__, info->dev_info->id, info->dev_info->id); | ||
229 | return -ENOTCONN; | 231 | return -ENOTCONN; |
230 | } | 232 | } |
231 | info->hdr_len += 1; | 233 | info->hdr_len += 1; |