diff options
author | Joe Perches <joe@perches.com> | 2010-01-26 06:40:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-27 00:15:56 -0500 |
commit | 99824461ea72ca0044cc6508f02c0e1cabf37ba5 (patch) | |
tree | 8672e525869778c9d4c12fe3982306387995bf2a /net/atm/signaling.c | |
parent | b747caf365b4121903b26d1cd65454c7bc607184 (diff) |
net/atm: Convert printk to pr_<level>
Add #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
Remove function names from output
Use single line pr_debug instead of broken multiple uses without newline
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/signaling.c')
-rw-r--r-- | net/atm/signaling.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/net/atm/signaling.c b/net/atm/signaling.c index 229921400522..28df4edf9ca4 100644 --- a/net/atm/signaling.c +++ b/net/atm/signaling.c | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ | 3 | /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ |
4 | 4 | ||
5 | #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__ | ||
5 | 6 | ||
6 | #include <linux/errno.h> /* error codes */ | 7 | #include <linux/errno.h> /* error codes */ |
7 | #include <linux/kernel.h> /* printk */ | 8 | #include <linux/kernel.h> /* printk */ |
@@ -37,14 +38,14 @@ static void sigd_put_skb(struct sk_buff *skb) | |||
37 | add_wait_queue(&sigd_sleep,&wait); | 38 | add_wait_queue(&sigd_sleep,&wait); |
38 | while (!sigd) { | 39 | while (!sigd) { |
39 | set_current_state(TASK_UNINTERRUPTIBLE); | 40 | set_current_state(TASK_UNINTERRUPTIBLE); |
40 | pr_debug("atmsvc: waiting for signaling demon...\n"); | 41 | pr_debug("atmsvc: waiting for signaling daemon...\n"); |
41 | schedule(); | 42 | schedule(); |
42 | } | 43 | } |
43 | current->state = TASK_RUNNING; | 44 | current->state = TASK_RUNNING; |
44 | remove_wait_queue(&sigd_sleep,&wait); | 45 | remove_wait_queue(&sigd_sleep,&wait); |
45 | #else | 46 | #else |
46 | if (!sigd) { | 47 | if (!sigd) { |
47 | pr_debug("atmsvc: no signaling demon\n"); | 48 | pr_debug("atmsvc: no signaling daemon\n"); |
48 | kfree_skb(skb); | 49 | kfree_skb(skb); |
49 | return; | 50 | return; |
50 | } | 51 | } |
@@ -90,8 +91,7 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb) | |||
90 | msg = (struct atmsvc_msg *) skb->data; | 91 | msg = (struct atmsvc_msg *) skb->data; |
91 | atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); | 92 | atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); |
92 | vcc = *(struct atm_vcc **) &msg->vcc; | 93 | vcc = *(struct atm_vcc **) &msg->vcc; |
93 | pr_debug("sigd_send %d (0x%lx)\n",(int) msg->type, | 94 | pr_debug("%d (0x%lx)\n", (int)msg->type, (unsigned long)vcc); |
94 | (unsigned long) vcc); | ||
95 | sk = sk_atm(vcc); | 95 | sk = sk_atm(vcc); |
96 | 96 | ||
97 | switch (msg->type) { | 97 | switch (msg->type) { |
@@ -150,8 +150,7 @@ as_indicate_complete: | |||
150 | clear_bit(ATM_VF_WAITING, &vcc->flags); | 150 | clear_bit(ATM_VF_WAITING, &vcc->flags); |
151 | break; | 151 | break; |
152 | default: | 152 | default: |
153 | printk(KERN_ALERT "sigd_send: bad message type %d\n", | 153 | pr_alert("bad message type %d\n", (int)msg->type); |
154 | (int) msg->type); | ||
155 | return -EINVAL; | 154 | return -EINVAL; |
156 | } | 155 | } |
157 | sk->sk_state_change(sk); | 156 | sk->sk_state_change(sk); |
@@ -169,7 +168,7 @@ void sigd_enq2(struct atm_vcc *vcc,enum atmsvc_msg_type type, | |||
169 | struct atmsvc_msg *msg; | 168 | struct atmsvc_msg *msg; |
170 | static unsigned session = 0; | 169 | static unsigned session = 0; |
171 | 170 | ||
172 | pr_debug("sigd_enq %d (0x%p)\n",(int) type,vcc); | 171 | pr_debug("%d (0x%p)\n", (int)type, vcc); |
173 | while (!(skb = alloc_skb(sizeof(struct atmsvc_msg),GFP_KERNEL))) | 172 | while (!(skb = alloc_skb(sizeof(struct atmsvc_msg),GFP_KERNEL))) |
174 | schedule(); | 173 | schedule(); |
175 | msg = (struct atmsvc_msg *) skb_put(skb,sizeof(struct atmsvc_msg)); | 174 | msg = (struct atmsvc_msg *) skb_put(skb,sizeof(struct atmsvc_msg)); |
@@ -219,10 +218,10 @@ static void sigd_close(struct atm_vcc *vcc) | |||
219 | struct sock *s; | 218 | struct sock *s; |
220 | int i; | 219 | int i; |
221 | 220 | ||
222 | pr_debug("sigd_close\n"); | 221 | pr_debug("\n"); |
223 | sigd = NULL; | 222 | sigd = NULL; |
224 | if (skb_peek(&sk_atm(vcc)->sk_receive_queue)) | 223 | if (skb_peek(&sk_atm(vcc)->sk_receive_queue)) |
225 | printk(KERN_ERR "sigd_close: closing with requests pending\n"); | 224 | pr_err("closing with requests pending\n"); |
226 | skb_queue_purge(&sk_atm(vcc)->sk_receive_queue); | 225 | skb_queue_purge(&sk_atm(vcc)->sk_receive_queue); |
227 | 226 | ||
228 | read_lock(&vcc_sklist_lock); | 227 | read_lock(&vcc_sklist_lock); |
@@ -256,7 +255,7 @@ static struct atm_dev sigd_dev = { | |||
256 | int sigd_attach(struct atm_vcc *vcc) | 255 | int sigd_attach(struct atm_vcc *vcc) |
257 | { | 256 | { |
258 | if (sigd) return -EADDRINUSE; | 257 | if (sigd) return -EADDRINUSE; |
259 | pr_debug("sigd_attach\n"); | 258 | pr_debug("\n"); |
260 | sigd = vcc; | 259 | sigd = vcc; |
261 | vcc->dev = &sigd_dev; | 260 | vcc->dev = &sigd_dev; |
262 | vcc_insert_socket(sk_atm(vcc)); | 261 | vcc_insert_socket(sk_atm(vcc)); |