diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-08-28 18:22:09 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:48:27 -0400 |
commit | 522400623e240ad134cb4101b1fddc3245d2a7ed (patch) | |
tree | fb1f341426ae7cd5c977232c8084bf45819d1bea /net/atm/common.c | |
parent | 23f1f4eff85d3d2ec9ed589e3fdcbba59eaa083e (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/common.c')
-rw-r--r-- | net/atm/common.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/net/atm/common.c b/net/atm/common.c index 282d761454ba..299ec1eb872a 100644 --- a/net/atm/common.c +++ b/net/atm/common.c | |||
@@ -30,13 +30,6 @@ | |||
30 | #include "addr.h" /* address registry */ | 30 | #include "addr.h" /* address registry */ |
31 | #include "signaling.h" /* for WAITING and sigd_attach */ | 31 | #include "signaling.h" /* for WAITING and sigd_attach */ |
32 | 32 | ||
33 | |||
34 | #if 0 | ||
35 | #define DPRINTK(format,args...) printk(KERN_DEBUG format,##args) | ||
36 | #else | ||
37 | #define DPRINTK(format,args...) | ||
38 | #endif | ||
39 | |||
40 | struct hlist_head vcc_hash[VCC_HTABLE_SIZE]; | 33 | struct hlist_head vcc_hash[VCC_HTABLE_SIZE]; |
41 | DEFINE_RWLOCK(vcc_sklist_lock); | 34 | DEFINE_RWLOCK(vcc_sklist_lock); |
42 | 35 | ||
@@ -70,13 +63,13 @@ static struct sk_buff *alloc_tx(struct atm_vcc *vcc,unsigned int size) | |||
70 | struct sock *sk = sk_atm(vcc); | 63 | struct sock *sk = sk_atm(vcc); |
71 | 64 | ||
72 | if (atomic_read(&sk->sk_wmem_alloc) && !atm_may_send(vcc, size)) { | 65 | if (atomic_read(&sk->sk_wmem_alloc) && !atm_may_send(vcc, size)) { |
73 | DPRINTK("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n", | 66 | pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n", |
74 | atomic_read(&sk->sk_wmem_alloc), size, | 67 | atomic_read(&sk->sk_wmem_alloc), size, |
75 | sk->sk_sndbuf); | 68 | sk->sk_sndbuf); |
76 | return NULL; | 69 | return NULL; |
77 | } | 70 | } |
78 | while (!(skb = alloc_skb(size,GFP_KERNEL))) schedule(); | 71 | while (!(skb = alloc_skb(size,GFP_KERNEL))) schedule(); |
79 | DPRINTK("AlTx %d += %d\n", atomic_read(&sk->sk_wmem_alloc), | 72 | pr_debug("AlTx %d += %d\n", atomic_read(&sk->sk_wmem_alloc), |
80 | skb->truesize); | 73 | skb->truesize); |
81 | atomic_add(skb->truesize, &sk->sk_wmem_alloc); | 74 | atomic_add(skb->truesize, &sk->sk_wmem_alloc); |
82 | return skb; | 75 | return skb; |
@@ -392,10 +385,10 @@ static int __vcc_connect(struct atm_vcc *vcc, struct atm_dev *dev, short vpi, | |||
392 | if (!error) error = adjust_tp(&vcc->qos.rxtp,vcc->qos.aal); | 385 | if (!error) error = adjust_tp(&vcc->qos.rxtp,vcc->qos.aal); |
393 | if (error) | 386 | if (error) |
394 | goto fail; | 387 | goto fail; |
395 | DPRINTK("VCC %d.%d, AAL %d\n",vpi,vci,vcc->qos.aal); | 388 | pr_debug("VCC %d.%d, AAL %d\n",vpi,vci,vcc->qos.aal); |
396 | DPRINTK(" TX: %d, PCR %d..%d, SDU %d\n",vcc->qos.txtp.traffic_class, | 389 | pr_debug(" TX: %d, PCR %d..%d, SDU %d\n",vcc->qos.txtp.traffic_class, |
397 | vcc->qos.txtp.min_pcr,vcc->qos.txtp.max_pcr,vcc->qos.txtp.max_sdu); | 390 | vcc->qos.txtp.min_pcr,vcc->qos.txtp.max_pcr,vcc->qos.txtp.max_sdu); |
398 | DPRINTK(" RX: %d, PCR %d..%d, SDU %d\n",vcc->qos.rxtp.traffic_class, | 391 | pr_debug(" RX: %d, PCR %d..%d, SDU %d\n",vcc->qos.rxtp.traffic_class, |
399 | vcc->qos.rxtp.min_pcr,vcc->qos.rxtp.max_pcr,vcc->qos.rxtp.max_sdu); | 392 | vcc->qos.rxtp.min_pcr,vcc->qos.rxtp.max_pcr,vcc->qos.rxtp.max_sdu); |
400 | 393 | ||
401 | if (dev->ops->open) { | 394 | if (dev->ops->open) { |
@@ -420,7 +413,7 @@ int vcc_connect(struct socket *sock, int itf, short vpi, int vci) | |||
420 | struct atm_vcc *vcc = ATM_SD(sock); | 413 | struct atm_vcc *vcc = ATM_SD(sock); |
421 | int error; | 414 | int error; |
422 | 415 | ||
423 | DPRINTK("vcc_connect (vpi %d, vci %d)\n",vpi,vci); | 416 | pr_debug("vcc_connect (vpi %d, vci %d)\n",vpi,vci); |
424 | if (sock->state == SS_CONNECTED) | 417 | if (sock->state == SS_CONNECTED) |
425 | return -EISCONN; | 418 | return -EISCONN; |
426 | if (sock->state != SS_UNCONNECTED) | 419 | if (sock->state != SS_UNCONNECTED) |
@@ -433,7 +426,7 @@ int vcc_connect(struct socket *sock, int itf, short vpi, int vci) | |||
433 | else | 426 | else |
434 | if (test_bit(ATM_VF_PARTIAL,&vcc->flags)) | 427 | if (test_bit(ATM_VF_PARTIAL,&vcc->flags)) |
435 | return -EINVAL; | 428 | return -EINVAL; |
436 | DPRINTK("vcc_connect (TX: cl %d,bw %d-%d,sdu %d; " | 429 | pr_debug("vcc_connect (TX: cl %d,bw %d-%d,sdu %d; " |
437 | "RX: cl %d,bw %d-%d,sdu %d,AAL %s%d)\n", | 430 | "RX: cl %d,bw %d-%d,sdu %d,AAL %s%d)\n", |
438 | vcc->qos.txtp.traffic_class,vcc->qos.txtp.min_pcr, | 431 | vcc->qos.txtp.traffic_class,vcc->qos.txtp.min_pcr, |
439 | vcc->qos.txtp.max_pcr,vcc->qos.txtp.max_sdu, | 432 | vcc->qos.txtp.max_pcr,vcc->qos.txtp.max_sdu, |
@@ -504,7 +497,7 @@ int vcc_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, | |||
504 | if (error) | 497 | if (error) |
505 | return error; | 498 | return error; |
506 | sock_recv_timestamp(msg, sk, skb); | 499 | sock_recv_timestamp(msg, sk, skb); |
507 | DPRINTK("RcvM %d -= %d\n", atomic_read(&sk->rmem_alloc), skb->truesize); | 500 | pr_debug("RcvM %d -= %d\n", atomic_read(&sk->sk_rmem_alloc), skb->truesize); |
508 | atm_return(vcc, skb->truesize); | 501 | atm_return(vcc, skb->truesize); |
509 | skb_free_datagram(sk, skb); | 502 | skb_free_datagram(sk, skb); |
510 | return copied; | 503 | return copied; |