aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm/svc.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/svc.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/svc.c')
-rw-r--r--net/atm/svc.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/net/atm/svc.c b/net/atm/svc.c
index 876ec7b47a2f..53d04c7992cf 100644
--- a/net/atm/svc.c
+++ b/net/atm/svc.c
@@ -25,17 +25,8 @@
25#include "signaling.h" 25#include "signaling.h"
26#include "addr.h" 26#include "addr.h"
27 27
28
29#if 0
30#define DPRINTK(format,args...) printk(KERN_DEBUG format,##args)
31#else
32#define DPRINTK(format,args...)
33#endif
34
35
36static int svc_create(struct socket *sock,int protocol); 28static int svc_create(struct socket *sock,int protocol);
37 29
38
39/* 30/*
40 * Note: since all this is still nicely synchronized with the signaling demon, 31 * Note: since all this is still nicely synchronized with the signaling demon,
41 * there's no need to protect sleep loops with clis. If signaling is 32 * there's no need to protect sleep loops with clis. If signaling is
@@ -55,7 +46,7 @@ static void svc_disconnect(struct atm_vcc *vcc)
55 struct sk_buff *skb; 46 struct sk_buff *skb;
56 struct sock *sk = sk_atm(vcc); 47 struct sock *sk = sk_atm(vcc);
57 48
58 DPRINTK("svc_disconnect %p\n",vcc); 49 pr_debug("svc_disconnect %p\n",vcc);
59 if (test_bit(ATM_VF_REGIS,&vcc->flags)) { 50 if (test_bit(ATM_VF_REGIS,&vcc->flags)) {
60 prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); 51 prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE);
61 sigd_enq(vcc,as_close,NULL,NULL,NULL); 52 sigd_enq(vcc,as_close,NULL,NULL,NULL);
@@ -69,7 +60,7 @@ static void svc_disconnect(struct atm_vcc *vcc)
69 as_indicate has been answered */ 60 as_indicate has been answered */
70 while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) { 61 while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) {
71 atm_return(vcc, skb->truesize); 62 atm_return(vcc, skb->truesize);
72 DPRINTK("LISTEN REL\n"); 63 pr_debug("LISTEN REL\n");
73 sigd_enq2(NULL,as_reject,vcc,NULL,NULL,&vcc->qos,0); 64 sigd_enq2(NULL,as_reject,vcc,NULL,NULL,&vcc->qos,0);
74 dev_kfree_skb(skb); 65 dev_kfree_skb(skb);
75 } 66 }
@@ -85,7 +76,7 @@ static int svc_release(struct socket *sock)
85 76
86 if (sk) { 77 if (sk) {
87 vcc = ATM_SD(sock); 78 vcc = ATM_SD(sock);
88 DPRINTK("svc_release %p\n", vcc); 79 pr_debug("svc_release %p\n", vcc);
89 clear_bit(ATM_VF_READY, &vcc->flags); 80 clear_bit(ATM_VF_READY, &vcc->flags);
90 /* VCC pointer is used as a reference, so we must not free it 81 /* VCC pointer is used as a reference, so we must not free it
91 (thereby subjecting it to re-use) before all pending connections 82 (thereby subjecting it to re-use) before all pending connections
@@ -162,7 +153,7 @@ static int svc_connect(struct socket *sock,struct sockaddr *sockaddr,
162 struct atm_vcc *vcc = ATM_SD(sock); 153 struct atm_vcc *vcc = ATM_SD(sock);
163 int error; 154 int error;
164 155
165 DPRINTK("svc_connect %p\n",vcc); 156 pr_debug("svc_connect %p\n",vcc);
166 lock_sock(sk); 157 lock_sock(sk);
167 if (sockaddr_len != sizeof(struct sockaddr_atmsvc)) { 158 if (sockaddr_len != sizeof(struct sockaddr_atmsvc)) {
168 error = -EINVAL; 159 error = -EINVAL;
@@ -224,7 +215,7 @@ static int svc_connect(struct socket *sock,struct sockaddr *sockaddr,
224 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); 215 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE);
225 continue; 216 continue;
226 } 217 }
227 DPRINTK("*ABORT*\n"); 218 pr_debug("*ABORT*\n");
228 /* 219 /*
229 * This is tricky: 220 * This is tricky:
230 * Kernel ---close--> Demon 221 * Kernel ---close--> Demon
@@ -295,7 +286,7 @@ static int svc_listen(struct socket *sock,int backlog)
295 struct atm_vcc *vcc = ATM_SD(sock); 286 struct atm_vcc *vcc = ATM_SD(sock);
296 int error; 287 int error;
297 288
298 DPRINTK("svc_listen %p\n",vcc); 289 pr_debug("svc_listen %p\n",vcc);
299 lock_sock(sk); 290 lock_sock(sk);
300 /* let server handle listen on unbound sockets */ 291 /* let server handle listen on unbound sockets */
301 if (test_bit(ATM_VF_SESSION,&vcc->flags)) { 292 if (test_bit(ATM_VF_SESSION,&vcc->flags)) {
@@ -341,7 +332,7 @@ static int svc_accept(struct socket *sock,struct socket *newsock,int flags)
341 332
342 new_vcc = ATM_SD(newsock); 333 new_vcc = ATM_SD(newsock);
343 334
344 DPRINTK("svc_accept %p -> %p\n",old_vcc,new_vcc); 335 pr_debug("svc_accept %p -> %p\n",old_vcc,new_vcc);
345 while (1) { 336 while (1) {
346 DEFINE_WAIT(wait); 337 DEFINE_WAIT(wait);
347 338
@@ -545,7 +536,7 @@ static int svc_addparty(struct socket *sock, struct sockaddr *sockaddr,
545 error = -EINPROGRESS; 536 error = -EINPROGRESS;
546 goto out; 537 goto out;
547 } 538 }
548 DPRINTK("svc_addparty added wait queue\n"); 539 pr_debug("svc_addparty added wait queue\n");
549 while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) { 540 while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) {
550 schedule(); 541 schedule();
551 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); 542 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE);