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/cffrml.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/cffrml.c')
-rw-r--r-- | net/caif/cffrml.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/caif/cffrml.c b/net/caif/cffrml.c index e86a4ca3b217..a445043931ae 100644 --- a/net/caif/cffrml.c +++ b/net/caif/cffrml.c | |||
@@ -6,6 +6,8 @@ | |||
6 | * License terms: GNU General Public License (GPL) version 2 | 6 | * License terms: GNU General Public License (GPL) version 2 |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__ | ||
10 | |||
9 | #include <linux/stddef.h> | 11 | #include <linux/stddef.h> |
10 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
11 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
@@ -32,7 +34,7 @@ struct cflayer *cffrml_create(u16 phyid, bool use_fcs) | |||
32 | { | 34 | { |
33 | struct cffrml *this = kmalloc(sizeof(struct cffrml), GFP_ATOMIC); | 35 | struct cffrml *this = kmalloc(sizeof(struct cffrml), GFP_ATOMIC); |
34 | if (!this) { | 36 | if (!this) { |
35 | pr_warning("CAIF: %s(): Out of memory\n", __func__); | 37 | pr_warn("Out of memory\n"); |
36 | return NULL; | 38 | return NULL; |
37 | } | 39 | } |
38 | caif_assert(offsetof(struct cffrml, layer) == 0); | 40 | caif_assert(offsetof(struct cffrml, layer) == 0); |
@@ -83,7 +85,7 @@ static int cffrml_receive(struct cflayer *layr, struct cfpkt *pkt) | |||
83 | 85 | ||
84 | if (cfpkt_setlen(pkt, len) < 0) { | 86 | if (cfpkt_setlen(pkt, len) < 0) { |
85 | ++cffrml_rcv_error; | 87 | ++cffrml_rcv_error; |
86 | pr_err("CAIF: %s():Framing length error (%d)\n", __func__, len); | 88 | pr_err("Framing length error (%d)\n", len); |
87 | cfpkt_destroy(pkt); | 89 | cfpkt_destroy(pkt); |
88 | return -EPROTO; | 90 | return -EPROTO; |
89 | } | 91 | } |
@@ -99,14 +101,14 @@ static int cffrml_receive(struct cflayer *layr, struct cfpkt *pkt) | |||
99 | cfpkt_add_trail(pkt, &tmp, 2); | 101 | cfpkt_add_trail(pkt, &tmp, 2); |
100 | ++cffrml_rcv_error; | 102 | ++cffrml_rcv_error; |
101 | ++cffrml_rcv_checsum_error; | 103 | ++cffrml_rcv_checsum_error; |
102 | pr_info("CAIF: %s(): Frame checksum error " | 104 | pr_info("Frame checksum error (0x%x != 0x%x)\n", |
103 | "(0x%x != 0x%x)\n", __func__, hdrchks, pktchks); | 105 | hdrchks, pktchks); |
104 | return -EILSEQ; | 106 | return -EILSEQ; |
105 | } | 107 | } |
106 | } | 108 | } |
107 | if (cfpkt_erroneous(pkt)) { | 109 | if (cfpkt_erroneous(pkt)) { |
108 | ++cffrml_rcv_error; | 110 | ++cffrml_rcv_error; |
109 | pr_err("CAIF: %s(): Packet is erroneous!\n", __func__); | 111 | pr_err("Packet is erroneous!\n"); |
110 | cfpkt_destroy(pkt); | 112 | cfpkt_destroy(pkt); |
111 | return -EPROTO; | 113 | return -EPROTO; |
112 | } | 114 | } |
@@ -132,7 +134,7 @@ static int cffrml_transmit(struct cflayer *layr, struct cfpkt *pkt) | |||
132 | cfpkt_add_head(pkt, &tmp, 2); | 134 | cfpkt_add_head(pkt, &tmp, 2); |
133 | cfpkt_info(pkt)->hdr_len += 2; | 135 | cfpkt_info(pkt)->hdr_len += 2; |
134 | if (cfpkt_erroneous(pkt)) { | 136 | if (cfpkt_erroneous(pkt)) { |
135 | pr_err("CAIF: %s(): Packet is erroneous!\n", __func__); | 137 | pr_err("Packet is erroneous!\n"); |
136 | return -EPROTO; | 138 | return -EPROTO; |
137 | } | 139 | } |
138 | ret = layr->dn->transmit(layr->dn, pkt); | 140 | ret = layr->dn->transmit(layr->dn, pkt); |