aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm/signaling.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-08-28 18:22:09 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:48:27 -0400
commit522400623e240ad134cb4101b1fddc3245d2a7ed (patch)
treefb1f341426ae7cd5c977232c8084bf45819d1bea /net/atm/signaling.c
parent23f1f4eff85d3d2ec9ed589e3fdcbba59eaa083e (diff)
[ATM]: Replace DPRINTK() with pr_debug().
Get rid of using DPRINTK macro in ATM and use pr_debug (in kernel.h). Using the standard macro is cleaner and forces code to check for bad arguments and formatting. Fixes from Thomas Graf. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/signaling.c')
-rw-r--r--net/atm/signaling.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/net/atm/signaling.c b/net/atm/signaling.c
index d14baaf1f4c3..bced78b77f12 100644
--- a/net/atm/signaling.c
+++ b/net/atm/signaling.c
@@ -23,13 +23,6 @@
23 Danger: may cause nasty hangs if the demon 23 Danger: may cause nasty hangs if the demon
24 crashes. */ 24 crashes. */
25 25
26#if 0
27#define DPRINTK(format,args...) printk(KERN_DEBUG format,##args)
28#else
29#define DPRINTK(format,args...)
30#endif
31
32
33struct atm_vcc *sigd = NULL; 26struct atm_vcc *sigd = NULL;
34#ifdef WAIT_FOR_DEMON 27#ifdef WAIT_FOR_DEMON
35static DECLARE_WAIT_QUEUE_HEAD(sigd_sleep); 28static DECLARE_WAIT_QUEUE_HEAD(sigd_sleep);
@@ -44,14 +37,14 @@ static void sigd_put_skb(struct sk_buff *skb)
44 add_wait_queue(&sigd_sleep,&wait); 37 add_wait_queue(&sigd_sleep,&wait);
45 while (!sigd) { 38 while (!sigd) {
46 set_current_state(TASK_UNINTERRUPTIBLE); 39 set_current_state(TASK_UNINTERRUPTIBLE);
47 DPRINTK("atmsvc: waiting for signaling demon...\n"); 40 pr_debug("atmsvc: waiting for signaling demon...\n");
48 schedule(); 41 schedule();
49 } 42 }
50 current->state = TASK_RUNNING; 43 current->state = TASK_RUNNING;
51 remove_wait_queue(&sigd_sleep,&wait); 44 remove_wait_queue(&sigd_sleep,&wait);
52#else 45#else
53 if (!sigd) { 46 if (!sigd) {
54 DPRINTK("atmsvc: no signaling demon\n"); 47 pr_debug("atmsvc: no signaling demon\n");
55 kfree_skb(skb); 48 kfree_skb(skb);
56 return; 49 return;
57 } 50 }
@@ -96,9 +89,9 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
96 89
97 msg = (struct atmsvc_msg *) skb->data; 90 msg = (struct atmsvc_msg *) skb->data;
98 atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); 91 atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
99 DPRINTK("sigd_send %d (0x%lx)\n",(int) msg->type,
100 (unsigned long) msg->vcc);
101 vcc = *(struct atm_vcc **) &msg->vcc; 92 vcc = *(struct atm_vcc **) &msg->vcc;
93 pr_debug("sigd_send %d (0x%lx)\n",(int) msg->type,
94 (unsigned long) vcc);
102 sk = sk_atm(vcc); 95 sk = sk_atm(vcc);
103 96
104 switch (msg->type) { 97 switch (msg->type) {
@@ -130,7 +123,7 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
130 case as_indicate: 123 case as_indicate:
131 vcc = *(struct atm_vcc **) &msg->listen_vcc; 124 vcc = *(struct atm_vcc **) &msg->listen_vcc;
132 sk = sk_atm(vcc); 125 sk = sk_atm(vcc);
133 DPRINTK("as_indicate!!!\n"); 126 pr_debug("as_indicate!!!\n");
134 lock_sock(sk); 127 lock_sock(sk);
135 if (sk_acceptq_is_full(sk)) { 128 if (sk_acceptq_is_full(sk)) {
136 sigd_enq(NULL,as_reject,vcc,NULL,NULL); 129 sigd_enq(NULL,as_reject,vcc,NULL,NULL);
@@ -139,7 +132,7 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
139 } 132 }
140 sk->sk_ack_backlog++; 133 sk->sk_ack_backlog++;
141 skb_queue_tail(&sk->sk_receive_queue, skb); 134 skb_queue_tail(&sk->sk_receive_queue, skb);
142 DPRINTK("waking sk->sk_sleep 0x%p\n", sk->sk_sleep); 135 pr_debug("waking sk->sk_sleep 0x%p\n", sk->sk_sleep);
143 sk->sk_state_change(sk); 136 sk->sk_state_change(sk);
144as_indicate_complete: 137as_indicate_complete:
145 release_sock(sk); 138 release_sock(sk);
@@ -176,7 +169,7 @@ void sigd_enq2(struct atm_vcc *vcc,enum atmsvc_msg_type type,
176 struct atmsvc_msg *msg; 169 struct atmsvc_msg *msg;
177 static unsigned session = 0; 170 static unsigned session = 0;
178 171
179 DPRINTK("sigd_enq %d (0x%p)\n",(int) type,vcc); 172 pr_debug("sigd_enq %d (0x%p)\n",(int) type,vcc);
180 while (!(skb = alloc_skb(sizeof(struct atmsvc_msg),GFP_KERNEL))) 173 while (!(skb = alloc_skb(sizeof(struct atmsvc_msg),GFP_KERNEL)))
181 schedule(); 174 schedule();
182 msg = (struct atmsvc_msg *) skb_put(skb,sizeof(struct atmsvc_msg)); 175 msg = (struct atmsvc_msg *) skb_put(skb,sizeof(struct atmsvc_msg));
@@ -226,7 +219,7 @@ static void sigd_close(struct atm_vcc *vcc)
226 struct sock *s; 219 struct sock *s;
227 int i; 220 int i;
228 221
229 DPRINTK("sigd_close\n"); 222 pr_debug("sigd_close\n");
230 sigd = NULL; 223 sigd = NULL;
231 if (skb_peek(&sk_atm(vcc)->sk_receive_queue)) 224 if (skb_peek(&sk_atm(vcc)->sk_receive_queue))
232 printk(KERN_ERR "sigd_close: closing with requests pending\n"); 225 printk(KERN_ERR "sigd_close: closing with requests pending\n");
@@ -263,7 +256,7 @@ static struct atm_dev sigd_dev = {
263int sigd_attach(struct atm_vcc *vcc) 256int sigd_attach(struct atm_vcc *vcc)
264{ 257{
265 if (sigd) return -EADDRINUSE; 258 if (sigd) return -EADDRINUSE;
266 DPRINTK("sigd_attach\n"); 259 pr_debug("sigd_attach\n");
267 sigd = vcc; 260 sigd = vcc;
268 vcc->dev = &sigd_dev; 261 vcc->dev = &sigd_dev;
269 vcc_insert_socket(sk_atm(vcc)); 262 vcc_insert_socket(sk_atm(vcc));