aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-01-26 06:40:00 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-27 00:15:56 -0500
commit99824461ea72ca0044cc6508f02c0e1cabf37ba5 (patch)
tree8672e525869778c9d4c12fe3982306387995bf2a
parentb747caf365b4121903b26d1cd65454c7bc607184 (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>
-rw-r--r--net/atm/br2684.c18
-rw-r--r--net/atm/clip.c60
-rw-r--r--net/atm/common.c52
-rw-r--r--net/atm/ioctl.c7
-rw-r--r--net/atm/lec.c192
-rw-r--r--net/atm/mpc.c4
-rw-r--r--net/atm/mpoa_proc.c3
-rw-r--r--net/atm/pppoatm.c17
-rw-r--r--net/atm/raw.c5
-rw-r--r--net/atm/resources.c12
-rw-r--r--net/atm/signaling.c19
-rw-r--r--net/atm/svc.c13
12 files changed, 190 insertions, 212 deletions
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index c9230c398697..d72b1a579911 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -6,6 +6,8 @@
6 * Eric Kinzie, 2006-2007, US Naval Research Laboratory 6 * Eric Kinzie, 2006-2007, US Naval Research Laboratory
7 */ 7 */
8 8
9#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
10
9#include <linux/module.h> 11#include <linux/module.h>
10#include <linux/init.h> 12#include <linux/init.h>
11#include <linux/kernel.h> 13#include <linux/kernel.h>
@@ -148,7 +150,7 @@ static void br2684_pop(struct atm_vcc *vcc, struct sk_buff *skb)
148 struct br2684_vcc *brvcc = BR2684_VCC(vcc); 150 struct br2684_vcc *brvcc = BR2684_VCC(vcc);
149 struct net_device *net_dev = skb->dev; 151 struct net_device *net_dev = skb->dev;
150 152
151 pr_debug("br2684_pop(vcc %p ; net_dev %p )\n", vcc, net_dev); 153 pr_debug("(vcc %p ; net_dev %p )\n", vcc, net_dev);
152 brvcc->old_pop(vcc, skb); 154 brvcc->old_pop(vcc, skb);
153 155
154 if (!net_dev) 156 if (!net_dev)
@@ -244,7 +246,7 @@ static netdev_tx_t br2684_start_xmit(struct sk_buff *skb,
244 struct br2684_dev *brdev = BRPRIV(dev); 246 struct br2684_dev *brdev = BRPRIV(dev);
245 struct br2684_vcc *brvcc; 247 struct br2684_vcc *brvcc;
246 248
247 pr_debug("br2684_start_xmit, skb_dst(skb)=%p\n", skb_dst(skb)); 249 pr_debug("skb_dst(skb)=%p\n", skb_dst(skb));
248 read_lock(&devs_lock); 250 read_lock(&devs_lock);
249 brvcc = pick_outgoing_vcc(skb, brdev); 251 brvcc = pick_outgoing_vcc(skb, brdev);
250 if (brvcc == NULL) { 252 if (brvcc == NULL) {
@@ -352,7 +354,7 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
352 struct net_device *net_dev = brvcc->device; 354 struct net_device *net_dev = brvcc->device;
353 struct br2684_dev *brdev = BRPRIV(net_dev); 355 struct br2684_dev *brdev = BRPRIV(net_dev);
354 356
355 pr_debug("br2684_push\n"); 357 pr_debug("\n");
356 358
357 if (unlikely(skb == NULL)) { 359 if (unlikely(skb == NULL)) {
358 /* skb==NULL means VCC is being destroyed */ 360 /* skb==NULL means VCC is being destroyed */
@@ -479,8 +481,7 @@ static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg)
479 write_lock_irq(&devs_lock); 481 write_lock_irq(&devs_lock);
480 net_dev = br2684_find_dev(&be.ifspec); 482 net_dev = br2684_find_dev(&be.ifspec);
481 if (net_dev == NULL) { 483 if (net_dev == NULL) {
482 printk(KERN_ERR 484 pr_err("tried to attach to non-existant device\n");
483 "br2684: tried to attach to non-existant device\n");
484 err = -ENXIO; 485 err = -ENXIO;
485 goto error; 486 goto error;
486 } 487 }
@@ -503,8 +504,7 @@ static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg)
503 err = -EINVAL; 504 err = -EINVAL;
504 goto error; 505 goto error;
505 } 506 }
506 pr_debug("br2684_regvcc vcc=%p, encaps=%d, brvcc=%p\n", atmvcc, 507 pr_debug("vcc=%p, encaps=%d, brvcc=%p\n", atmvcc, be.encaps, brvcc);
507 be.encaps, brvcc);
508 if (list_empty(&brdev->brvccs) && !brdev->mac_was_set) { 508 if (list_empty(&brdev->brvccs) && !brdev->mac_was_set) {
509 unsigned char *esi = atmvcc->dev->esi; 509 unsigned char *esi = atmvcc->dev->esi;
510 if (esi[0] | esi[1] | esi[2] | esi[3] | esi[4] | esi[5]) 510 if (esi[0] | esi[1] | esi[2] | esi[3] | esi[4] | esi[5])
@@ -595,7 +595,7 @@ static int br2684_create(void __user * arg)
595 struct atm_newif_br2684 ni; 595 struct atm_newif_br2684 ni;
596 enum br2684_payload payload; 596 enum br2684_payload payload;
597 597
598 pr_debug("br2684_create\n"); 598 pr_debug("\n");
599 599
600 if (copy_from_user(&ni, arg, sizeof ni)) { 600 if (copy_from_user(&ni, arg, sizeof ni)) {
601 return -EFAULT; 601 return -EFAULT;
@@ -624,7 +624,7 @@ static int br2684_create(void __user * arg)
624 /* open, stop, do_ioctl ? */ 624 /* open, stop, do_ioctl ? */
625 err = register_netdev(netdev); 625 err = register_netdev(netdev);
626 if (err < 0) { 626 if (err < 0) {
627 printk(KERN_ERR "br2684_create: register_netdev failed\n"); 627 pr_err("register_netdev failed\n");
628 free_netdev(netdev); 628 free_netdev(netdev);
629 return err; 629 return err;
630 } 630 }
diff --git a/net/atm/clip.c b/net/atm/clip.c
index 64629c354343..d7939fd58cd3 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -2,6 +2,8 @@
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__
6
5#include <linux/string.h> 7#include <linux/string.h>
6#include <linux/errno.h> 8#include <linux/errno.h>
7#include <linux/kernel.h> /* for UINT_MAX */ 9#include <linux/kernel.h> /* for UINT_MAX */
@@ -51,7 +53,7 @@ static int to_atmarpd(enum atmarp_ctrl_type type, int itf, __be32 ip)
51 struct atmarp_ctrl *ctrl; 53 struct atmarp_ctrl *ctrl;
52 struct sk_buff *skb; 54 struct sk_buff *skb;
53 55
54 pr_debug("to_atmarpd(%d)\n", type); 56 pr_debug("(%d)\n", type);
55 if (!atmarpd) 57 if (!atmarpd)
56 return -EUNATCH; 58 return -EUNATCH;
57 skb = alloc_skb(sizeof(struct atmarp_ctrl),GFP_ATOMIC); 59 skb = alloc_skb(sizeof(struct atmarp_ctrl),GFP_ATOMIC);
@@ -71,8 +73,7 @@ static int to_atmarpd(enum atmarp_ctrl_type type, int itf, __be32 ip)
71 73
72static void link_vcc(struct clip_vcc *clip_vcc, struct atmarp_entry *entry) 74static void link_vcc(struct clip_vcc *clip_vcc, struct atmarp_entry *entry)
73{ 75{
74 pr_debug("link_vcc %p to entry %p (neigh %p)\n", clip_vcc, entry, 76 pr_debug("%p to entry %p (neigh %p)\n", clip_vcc, entry, entry->neigh);
75 entry->neigh);
76 clip_vcc->entry = entry; 77 clip_vcc->entry = entry;
77 clip_vcc->xoff = 0; /* @@@ may overrun buffer by one packet */ 78 clip_vcc->xoff = 0; /* @@@ may overrun buffer by one packet */
78 clip_vcc->next = entry->vccs; 79 clip_vcc->next = entry->vccs;
@@ -86,7 +87,7 @@ static void unlink_clip_vcc(struct clip_vcc *clip_vcc)
86 struct clip_vcc **walk; 87 struct clip_vcc **walk;
87 88
88 if (!entry) { 89 if (!entry) {
89 printk(KERN_CRIT "!clip_vcc->entry (clip_vcc %p)\n", clip_vcc); 90 pr_crit("!clip_vcc->entry (clip_vcc %p)\n", clip_vcc);
90 return; 91 return;
91 } 92 }
92 netif_tx_lock_bh(entry->neigh->dev); /* block clip_start_xmit() */ 93 netif_tx_lock_bh(entry->neigh->dev); /* block clip_start_xmit() */
@@ -106,12 +107,10 @@ static void unlink_clip_vcc(struct clip_vcc *clip_vcc)
106 error = neigh_update(entry->neigh, NULL, NUD_NONE, 107 error = neigh_update(entry->neigh, NULL, NUD_NONE,
107 NEIGH_UPDATE_F_ADMIN); 108 NEIGH_UPDATE_F_ADMIN);
108 if (error) 109 if (error)
109 printk(KERN_CRIT "unlink_clip_vcc: " 110 pr_crit("neigh_update failed with %d\n", error);
110 "neigh_update failed with %d\n", error);
111 goto out; 111 goto out;
112 } 112 }
113 printk(KERN_CRIT "ATMARP: unlink_clip_vcc failed (entry %p, vcc " 113 pr_crit("ATMARP: failed (entry %p, vcc 0x%p)\n", entry, clip_vcc);
114 "0x%p)\n", entry, clip_vcc);
115 out: 114 out:
116 netif_tx_unlock_bh(entry->neigh->dev); 115 netif_tx_unlock_bh(entry->neigh->dev);
117} 116}
@@ -127,7 +126,7 @@ static int neigh_check_cb(struct neighbour *n)
127 126
128 if (cv->idle_timeout && time_after(jiffies, exp)) { 127 if (cv->idle_timeout && time_after(jiffies, exp)) {
129 pr_debug("releasing vcc %p->%p of entry %p\n", 128 pr_debug("releasing vcc %p->%p of entry %p\n",
130 cv, cv->vcc, entry); 129 cv, cv->vcc, entry);
131 vcc_release_async(cv->vcc, -ETIMEDOUT); 130 vcc_release_async(cv->vcc, -ETIMEDOUT);
132 } 131 }
133 } 132 }
@@ -139,7 +138,7 @@ static int neigh_check_cb(struct neighbour *n)
139 struct sk_buff *skb; 138 struct sk_buff *skb;
140 139
141 pr_debug("destruction postponed with ref %d\n", 140 pr_debug("destruction postponed with ref %d\n",
142 atomic_read(&n->refcnt)); 141 atomic_read(&n->refcnt));
143 142
144 while ((skb = skb_dequeue(&n->arp_queue)) != NULL) 143 while ((skb = skb_dequeue(&n->arp_queue)) != NULL)
145 dev_kfree_skb(skb); 144 dev_kfree_skb(skb);
@@ -163,7 +162,7 @@ static int clip_arp_rcv(struct sk_buff *skb)
163{ 162{
164 struct atm_vcc *vcc; 163 struct atm_vcc *vcc;
165 164
166 pr_debug("clip_arp_rcv\n"); 165 pr_debug("\n");
167 vcc = ATM_SKB(skb)->vcc; 166 vcc = ATM_SKB(skb)->vcc;
168 if (!vcc || !atm_charge(vcc, skb->truesize)) { 167 if (!vcc || !atm_charge(vcc, skb->truesize)) {
169 dev_kfree_skb_any(skb); 168 dev_kfree_skb_any(skb);
@@ -188,7 +187,7 @@ static void clip_push(struct atm_vcc *vcc, struct sk_buff *skb)
188{ 187{
189 struct clip_vcc *clip_vcc = CLIP_VCC(vcc); 188 struct clip_vcc *clip_vcc = CLIP_VCC(vcc);
190 189
191 pr_debug("clip push\n"); 190 pr_debug("\n");
192 if (!skb) { 191 if (!skb) {
193 pr_debug("removing VCC %p\n", clip_vcc); 192 pr_debug("removing VCC %p\n", clip_vcc);
194 if (clip_vcc->entry) 193 if (clip_vcc->entry)
@@ -239,7 +238,7 @@ static void clip_pop(struct atm_vcc *vcc, struct sk_buff *skb)
239 int old; 238 int old;
240 unsigned long flags; 239 unsigned long flags;
241 240
242 pr_debug("clip_pop(vcc %p)\n", vcc); 241 pr_debug("(vcc %p)\n", vcc);
243 clip_vcc->old_pop(vcc, skb); 242 clip_vcc->old_pop(vcc, skb);
244 /* skb->dev == NULL in outbound ARP packets */ 243 /* skb->dev == NULL in outbound ARP packets */
245 if (!dev) 244 if (!dev)
@@ -255,7 +254,7 @@ static void clip_pop(struct atm_vcc *vcc, struct sk_buff *skb)
255 254
256static void clip_neigh_solicit(struct neighbour *neigh, struct sk_buff *skb) 255static void clip_neigh_solicit(struct neighbour *neigh, struct sk_buff *skb)
257{ 256{
258 pr_debug("clip_neigh_solicit (neigh %p, skb %p)\n", neigh, skb); 257 pr_debug("(neigh %p, skb %p)\n", neigh, skb);
259 to_atmarpd(act_need, PRIV(neigh->dev)->number, NEIGH2ENTRY(neigh)->ip); 258 to_atmarpd(act_need, PRIV(neigh->dev)->number, NEIGH2ENTRY(neigh)->ip);
260} 259}
261 260
@@ -284,7 +283,7 @@ static int clip_constructor(struct neighbour *neigh)
284 struct in_device *in_dev; 283 struct in_device *in_dev;
285 struct neigh_parms *parms; 284 struct neigh_parms *parms;
286 285
287 pr_debug("clip_constructor (neigh %p, entry %p)\n", neigh, entry); 286 pr_debug("(neigh %p, entry %p)\n", neigh, entry);
288 neigh->type = inet_addr_type(&init_net, entry->ip); 287 neigh->type = inet_addr_type(&init_net, entry->ip);
289 if (neigh->type != RTN_UNICAST) 288 if (neigh->type != RTN_UNICAST)
290 return -EINVAL; 289 return -EINVAL;
@@ -369,9 +368,9 @@ static netdev_tx_t clip_start_xmit(struct sk_buff *skb,
369 int old; 368 int old;
370 unsigned long flags; 369 unsigned long flags;
371 370
372 pr_debug("clip_start_xmit (skb %p)\n", skb); 371 pr_debug("(skb %p)\n", skb);
373 if (!skb_dst(skb)) { 372 if (!skb_dst(skb)) {
374 printk(KERN_ERR "clip_start_xmit: skb_dst(skb) == NULL\n"); 373 pr_err("skb_dst(skb) == NULL\n");
375 dev_kfree_skb(skb); 374 dev_kfree_skb(skb);
376 dev->stats.tx_dropped++; 375 dev->stats.tx_dropped++;
377 return NETDEV_TX_OK; 376 return NETDEV_TX_OK;
@@ -385,7 +384,7 @@ static netdev_tx_t clip_start_xmit(struct sk_buff *skb,
385 return 0; 384 return 0;
386 } 385 }
387#endif 386#endif
388 printk(KERN_ERR "clip_start_xmit: NO NEIGHBOUR !\n"); 387 pr_err("NO NEIGHBOUR !\n");
389 dev_kfree_skb(skb); 388 dev_kfree_skb(skb);
390 dev->stats.tx_dropped++; 389 dev->stats.tx_dropped++;
391 return NETDEV_TX_OK; 390 return NETDEV_TX_OK;
@@ -421,7 +420,7 @@ static netdev_tx_t clip_start_xmit(struct sk_buff *skb,
421 pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, vcc, vcc->dev); 420 pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, vcc, vcc->dev);
422 old = xchg(&entry->vccs->xoff, 1); /* assume XOFF ... */ 421 old = xchg(&entry->vccs->xoff, 1); /* assume XOFF ... */
423 if (old) { 422 if (old) {
424 printk(KERN_WARNING "clip_start_xmit: XOFF->XOFF transition\n"); 423 pr_warning("XOFF->XOFF transition\n");
425 return NETDEV_TX_OK; 424 return NETDEV_TX_OK;
426 } 425 }
427 dev->stats.tx_packets++; 426 dev->stats.tx_packets++;
@@ -456,7 +455,7 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout)
456 clip_vcc = kmalloc(sizeof(struct clip_vcc), GFP_KERNEL); 455 clip_vcc = kmalloc(sizeof(struct clip_vcc), GFP_KERNEL);
457 if (!clip_vcc) 456 if (!clip_vcc)
458 return -ENOMEM; 457 return -ENOMEM;
459 pr_debug("mkip clip_vcc %p vcc %p\n", clip_vcc, vcc); 458 pr_debug("%p vcc %p\n", clip_vcc, vcc);
460 clip_vcc->vcc = vcc; 459 clip_vcc->vcc = vcc;
461 vcc->user_back = clip_vcc; 460 vcc->user_back = clip_vcc;
462 set_bit(ATM_VF_IS_CLIP, &vcc->flags); 461 set_bit(ATM_VF_IS_CLIP, &vcc->flags);
@@ -506,16 +505,16 @@ static int clip_setentry(struct atm_vcc *vcc, __be32 ip)
506 struct rtable *rt; 505 struct rtable *rt;
507 506
508 if (vcc->push != clip_push) { 507 if (vcc->push != clip_push) {
509 printk(KERN_WARNING "clip_setentry: non-CLIP VCC\n"); 508 pr_warning("non-CLIP VCC\n");
510 return -EBADF; 509 return -EBADF;
511 } 510 }
512 clip_vcc = CLIP_VCC(vcc); 511 clip_vcc = CLIP_VCC(vcc);
513 if (!ip) { 512 if (!ip) {
514 if (!clip_vcc->entry) { 513 if (!clip_vcc->entry) {
515 printk(KERN_ERR "hiding hidden ATMARP entry\n"); 514 pr_err("hiding hidden ATMARP entry\n");
516 return 0; 515 return 0;
517 } 516 }
518 pr_debug("setentry: remove\n"); 517 pr_debug("remove\n");
519 unlink_clip_vcc(clip_vcc); 518 unlink_clip_vcc(clip_vcc);
520 return 0; 519 return 0;
521 } 520 }
@@ -529,9 +528,9 @@ static int clip_setentry(struct atm_vcc *vcc, __be32 ip)
529 entry = NEIGH2ENTRY(neigh); 528 entry = NEIGH2ENTRY(neigh);
530 if (entry != clip_vcc->entry) { 529 if (entry != clip_vcc->entry) {
531 if (!clip_vcc->entry) 530 if (!clip_vcc->entry)
532 pr_debug("setentry: add\n"); 531 pr_debug("add\n");
533 else { 532 else {
534 pr_debug("setentry: update\n"); 533 pr_debug("update\n");
535 unlink_clip_vcc(clip_vcc); 534 unlink_clip_vcc(clip_vcc);
536 } 535 }
537 link_vcc(clip_vcc, entry); 536 link_vcc(clip_vcc, entry);
@@ -614,16 +613,16 @@ static int clip_device_event(struct notifier_block *this, unsigned long event,
614 613
615 switch (event) { 614 switch (event) {
616 case NETDEV_UP: 615 case NETDEV_UP:
617 pr_debug("clip_device_event NETDEV_UP\n"); 616 pr_debug("NETDEV_UP\n");
618 to_atmarpd(act_up, PRIV(dev)->number, 0); 617 to_atmarpd(act_up, PRIV(dev)->number, 0);
619 break; 618 break;
620 case NETDEV_GOING_DOWN: 619 case NETDEV_GOING_DOWN:
621 pr_debug("clip_device_event NETDEV_DOWN\n"); 620 pr_debug("NETDEV_DOWN\n");
622 to_atmarpd(act_down, PRIV(dev)->number, 0); 621 to_atmarpd(act_down, PRIV(dev)->number, 0);
623 break; 622 break;
624 case NETDEV_CHANGE: 623 case NETDEV_CHANGE:
625 case NETDEV_CHANGEMTU: 624 case NETDEV_CHANGEMTU:
626 pr_debug("clip_device_event NETDEV_CHANGE*\n"); 625 pr_debug("NETDEV_CHANGE*\n");
627 to_atmarpd(act_change, PRIV(dev)->number, 0); 626 to_atmarpd(act_change, PRIV(dev)->number, 0);
628 break; 627 break;
629 } 628 }
@@ -660,7 +659,7 @@ static struct notifier_block clip_inet_notifier = {
660 659
661static void atmarpd_close(struct atm_vcc *vcc) 660static void atmarpd_close(struct atm_vcc *vcc)
662{ 661{
663 pr_debug("atmarpd_close\n"); 662 pr_debug("\n");
664 663
665 rtnl_lock(); 664 rtnl_lock();
666 atmarpd = NULL; 665 atmarpd = NULL;
@@ -950,8 +949,7 @@ static int __init atm_clip_init(void)
950 949
951 p = proc_create("arp", S_IRUGO, atm_proc_root, &arp_seq_fops); 950 p = proc_create("arp", S_IRUGO, atm_proc_root, &arp_seq_fops);
952 if (!p) { 951 if (!p) {
953 printk(KERN_ERR "Unable to initialize " 952 pr_err("Unable to initialize /proc/net/atm/arp\n");
954 "/proc/net/atm/arp\n");
955 atm_clip_exit_noproc(); 953 atm_clip_exit_noproc();
956 return -ENOMEM; 954 return -ENOMEM;
957 } 955 }
diff --git a/net/atm/common.c b/net/atm/common.c
index d61e051e0a3f..17f7e5f2131b 100644
--- a/net/atm/common.c
+++ b/net/atm/common.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/module.h> 7#include <linux/module.h>
7#include <linux/kmod.h> 8#include <linux/kmod.h>
@@ -64,8 +65,7 @@ static struct sk_buff *alloc_tx(struct atm_vcc *vcc,unsigned int size)
64 65
65 if (sk_wmem_alloc_get(sk) && !atm_may_send(vcc, size)) { 66 if (sk_wmem_alloc_get(sk) && !atm_may_send(vcc, size)) {
66 pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n", 67 pr_debug("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n",
67 sk_wmem_alloc_get(sk), size, 68 sk_wmem_alloc_get(sk), size, sk->sk_sndbuf);
68 sk->sk_sndbuf);
69 return NULL; 69 return NULL;
70 } 70 }
71 while (!(skb = alloc_skb(size, GFP_KERNEL))) 71 while (!(skb = alloc_skb(size, GFP_KERNEL)))
@@ -249,8 +249,7 @@ static int adjust_tp(struct atm_trafprm *tp,unsigned char aal)
249 max_sdu = ATM_MAX_AAL34_PDU; 249 max_sdu = ATM_MAX_AAL34_PDU;
250 break; 250 break;
251 default: 251 default:
252 printk(KERN_WARNING "ATM: AAL problems ... " 252 pr_warning("AAL problems ... (%d)\n", aal);
253 "(%d)\n",aal);
254 /* fall through */ 253 /* fall through */
255 case ATM_AAL5: 254 case ATM_AAL5:
256 max_sdu = ATM_MAX_AAL5_PDU; 255 max_sdu = ATM_MAX_AAL5_PDU;
@@ -385,11 +384,17 @@ static int __vcc_connect(struct atm_vcc *vcc, struct atm_dev *dev, short vpi,
385 if (!error) error = adjust_tp(&vcc->qos.rxtp,vcc->qos.aal); 384 if (!error) error = adjust_tp(&vcc->qos.rxtp,vcc->qos.aal);
386 if (error) 385 if (error)
387 goto fail; 386 goto fail;
388 pr_debug("VCC %d.%d, AAL %d\n",vpi,vci,vcc->qos.aal); 387 pr_debug("VCC %d.%d, AAL %d\n", vpi, vci, vcc->qos.aal);
389 pr_debug(" TX: %d, PCR %d..%d, SDU %d\n",vcc->qos.txtp.traffic_class, 388 pr_debug(" TX: %d, PCR %d..%d, SDU %d\n",
390 vcc->qos.txtp.min_pcr,vcc->qos.txtp.max_pcr,vcc->qos.txtp.max_sdu); 389 vcc->qos.txtp.traffic_class,
391 pr_debug(" RX: %d, PCR %d..%d, SDU %d\n",vcc->qos.rxtp.traffic_class, 390 vcc->qos.txtp.min_pcr,
392 vcc->qos.rxtp.min_pcr,vcc->qos.rxtp.max_pcr,vcc->qos.rxtp.max_sdu); 391 vcc->qos.txtp.max_pcr,
392 vcc->qos.txtp.max_sdu);
393 pr_debug(" RX: %d, PCR %d..%d, SDU %d\n",
394 vcc->qos.rxtp.traffic_class,
395 vcc->qos.rxtp.min_pcr,
396 vcc->qos.rxtp.max_pcr,
397 vcc->qos.rxtp.max_sdu);
393 398
394 if (dev->ops->open) { 399 if (dev->ops->open) {
395 if ((error = dev->ops->open(vcc))) 400 if ((error = dev->ops->open(vcc)))
@@ -413,7 +418,7 @@ int vcc_connect(struct socket *sock, int itf, short vpi, int vci)
413 struct atm_vcc *vcc = ATM_SD(sock); 418 struct atm_vcc *vcc = ATM_SD(sock);
414 int error; 419 int error;
415 420
416 pr_debug("vcc_connect (vpi %d, vci %d)\n",vpi,vci); 421 pr_debug("(vpi %d, vci %d)\n", vpi, vci);
417 if (sock->state == SS_CONNECTED) 422 if (sock->state == SS_CONNECTED)
418 return -EISCONN; 423 return -EISCONN;
419 if (sock->state != SS_UNCONNECTED) 424 if (sock->state != SS_UNCONNECTED)
@@ -426,14 +431,15 @@ int vcc_connect(struct socket *sock, int itf, short vpi, int vci)
426 else 431 else
427 if (test_bit(ATM_VF_PARTIAL,&vcc->flags)) 432 if (test_bit(ATM_VF_PARTIAL,&vcc->flags))
428 return -EINVAL; 433 return -EINVAL;
429 pr_debug("vcc_connect (TX: cl %d,bw %d-%d,sdu %d; " 434 pr_debug("(TX: cl %d,bw %d-%d,sdu %d; "
430 "RX: cl %d,bw %d-%d,sdu %d,AAL %s%d)\n", 435 "RX: cl %d,bw %d-%d,sdu %d,AAL %s%d)\n",
431 vcc->qos.txtp.traffic_class,vcc->qos.txtp.min_pcr, 436 vcc->qos.txtp.traffic_class, vcc->qos.txtp.min_pcr,
432 vcc->qos.txtp.max_pcr,vcc->qos.txtp.max_sdu, 437 vcc->qos.txtp.max_pcr, vcc->qos.txtp.max_sdu,
433 vcc->qos.rxtp.traffic_class,vcc->qos.rxtp.min_pcr, 438 vcc->qos.rxtp.traffic_class, vcc->qos.rxtp.min_pcr,
434 vcc->qos.rxtp.max_pcr,vcc->qos.rxtp.max_sdu, 439 vcc->qos.rxtp.max_pcr,vcc->qos.rxtp.max_sdu,
435 vcc->qos.aal == ATM_AAL5 ? "" : vcc->qos.aal == ATM_AAL0 ? "" : 440 vcc->qos.aal == ATM_AAL5 ? "" :
436 " ??? code ",vcc->qos.aal == ATM_AAL0 ? 0 : vcc->qos.aal); 441 vcc->qos.aal == ATM_AAL0 ? "" : " ??? code ",
442 vcc->qos.aal == ATM_AAL0 ? 0 : vcc->qos.aal);
437 if (!test_bit(ATM_VF_HASQOS, &vcc->flags)) 443 if (!test_bit(ATM_VF_HASQOS, &vcc->flags))
438 return -EBADFD; 444 return -EBADFD;
439 if (vcc->qos.txtp.traffic_class == ATM_ANYCLASS || 445 if (vcc->qos.txtp.traffic_class == ATM_ANYCLASS ||
@@ -497,7 +503,7 @@ int vcc_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
497 if (error) 503 if (error)
498 return error; 504 return error;
499 sock_recv_ts_and_drops(msg, sk, skb); 505 sock_recv_ts_and_drops(msg, sk, skb);
500 pr_debug("RcvM %d -= %d\n", atomic_read(&sk->sk_rmem_alloc), skb->truesize); 506 pr_debug("%d -= %d\n", atomic_read(&sk->sk_rmem_alloc), skb->truesize);
501 atm_return(vcc, skb->truesize); 507 atm_return(vcc, skb->truesize);
502 skb_free_datagram(sk, skb); 508 skb_free_datagram(sk, skb);
503 return copied; 509 return copied;
@@ -772,19 +778,19 @@ static int __init atm_init(void)
772 goto out; 778 goto out;
773 779
774 if ((error = atmpvc_init()) < 0) { 780 if ((error = atmpvc_init()) < 0) {
775 printk(KERN_ERR "atmpvc_init() failed with %d\n", error); 781 pr_err("atmpvc_init() failed with %d\n", error);
776 goto out_unregister_vcc_proto; 782 goto out_unregister_vcc_proto;
777 } 783 }
778 if ((error = atmsvc_init()) < 0) { 784 if ((error = atmsvc_init()) < 0) {
779 printk(KERN_ERR "atmsvc_init() failed with %d\n", error); 785 pr_err("atmsvc_init() failed with %d\n", error);
780 goto out_atmpvc_exit; 786 goto out_atmpvc_exit;
781 } 787 }
782 if ((error = atm_proc_init()) < 0) { 788 if ((error = atm_proc_init()) < 0) {
783 printk(KERN_ERR "atm_proc_init() failed with %d\n",error); 789 pr_err("atm_proc_init() failed with %d\n", error);
784 goto out_atmsvc_exit; 790 goto out_atmsvc_exit;
785 } 791 }
786 if ((error = atm_sysfs_init()) < 0) { 792 if ((error = atm_sysfs_init()) < 0) {
787 printk(KERN_ERR "atm_sysfs_init() failed with %d\n",error); 793 pr_err("atm_sysfs_init() failed with %d\n", error);
788 goto out_atmproc_exit; 794 goto out_atmproc_exit;
789 } 795 }
790out: 796out:
diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c
index 2ea40995dced..b75afba1f72b 100644
--- a/net/atm/ioctl.c
+++ b/net/atm/ioctl.c
@@ -3,6 +3,7 @@
3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ 3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
4/* 2003 John Levon <levon@movementarian.org> */ 4/* 2003 John Levon <levon@movementarian.org> */
5 5
6#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
6 7
7#include <linux/module.h> 8#include <linux/module.h>
8#include <linux/kmod.h> 9#include <linux/kmod.h>
@@ -97,8 +98,8 @@ static int do_vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg
97 goto done; 98 goto done;
98 case ATM_SETSC: 99 case ATM_SETSC:
99 if (net_ratelimit()) 100 if (net_ratelimit())
100 printk(KERN_WARNING "ATM_SETSC is obsolete; used by %s:%d\n", 101 pr_warning("ATM_SETSC is obsolete; used by %s:%d\n",
101 current->comm, task_pid_nr(current)); 102 current->comm, task_pid_nr(current));
102 error = 0; 103 error = 0;
103 goto done; 104 goto done;
104 case ATMSIGD_CTRL: 105 case ATMSIGD_CTRL:
@@ -123,7 +124,7 @@ static int do_vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg
123 to think about it at all. dwmw2. */ 124 to think about it at all. dwmw2. */
124 if (compat) { 125 if (compat) {
125 if (net_ratelimit()) 126 if (net_ratelimit())
126 printk(KERN_WARNING "32-bit task cannot be atmsigd\n"); 127 pr_warning("32-bit task cannot be atmsigd\n");
127 error = -EINVAL; 128 error = -EINVAL;
128 goto done; 129 goto done;
129 } 130 }
diff --git a/net/atm/lec.c b/net/atm/lec.c
index 42749b7b917c..6873813c3c99 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -4,6 +4,8 @@
4 * Marko Kiiskila <mkiiskila@yahoo.com> 4 * Marko Kiiskila <mkiiskila@yahoo.com>
5 */ 5 */
6 6
7#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
8
7#include <linux/kernel.h> 9#include <linux/kernel.h>
8#include <linux/bitops.h> 10#include <linux/bitops.h>
9#include <linux/capability.h> 11#include <linux/capability.h>
@@ -242,7 +244,7 @@ lec_send(struct atm_vcc *vcc, struct sk_buff *skb)
242 244
243static void lec_tx_timeout(struct net_device *dev) 245static void lec_tx_timeout(struct net_device *dev)
244{ 246{
245 printk(KERN_INFO "%s: tx timeout\n", dev->name); 247 pr_info("%s\n", dev->name);
246 dev->trans_start = jiffies; 248 dev->trans_start = jiffies;
247 netif_wake_queue(dev); 249 netif_wake_queue(dev);
248} 250}
@@ -266,7 +268,7 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
266 int i = 0; 268 int i = 0;
267#endif /* DUMP_PACKETS >0 */ 269#endif /* DUMP_PACKETS >0 */
268 270
269 pr_debug("lec_start_xmit called\n"); 271 pr_debug("called\n");
270 if (!priv->lecd) { 272 if (!priv->lecd) {
271 printk("%s:No lecd attached\n", dev->name); 273 printk("%s:No lecd attached\n", dev->name);
272 dev->stats.tx_errors++; 274 dev->stats.tx_errors++;
@@ -276,8 +278,8 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
276 } 278 }
277 279
278 pr_debug("skbuff head:%lx data:%lx tail:%lx end:%lx\n", 280 pr_debug("skbuff head:%lx data:%lx tail:%lx end:%lx\n",
279 (long)skb->head, (long)skb->data, (long)skb_tail_pointer(skb), 281 (long)skb->head, (long)skb->data, (long)skb_tail_pointer(skb),
280 (long)skb_end_pointer(skb)); 282 (long)skb_end_pointer(skb));
281#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) 283#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
282 if (memcmp(skb->data, bridge_ula_lec, sizeof(bridge_ula_lec)) == 0) 284 if (memcmp(skb->data, bridge_ula_lec, sizeof(bridge_ula_lec)) == 0)
283 lec_handle_bridge(skb, dev); 285 lec_handle_bridge(skb, dev);
@@ -286,7 +288,7 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
286 /* Make sure we have room for lec_id */ 288 /* Make sure we have room for lec_id */
287 if (skb_headroom(skb) < 2) { 289 if (skb_headroom(skb) < 2) {
288 290
289 pr_debug("lec_start_xmit: reallocating skb\n"); 291 pr_debug("reallocating skb\n");
290 skb2 = skb_realloc_headroom(skb, LEC_HEADER_LEN); 292 skb2 = skb_realloc_headroom(skb, LEC_HEADER_LEN);
291 kfree_skb(skb); 293 kfree_skb(skb);
292 if (skb2 == NULL) 294 if (skb2 == NULL)
@@ -367,19 +369,16 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
367#endif 369#endif
368 entry = NULL; 370 entry = NULL;
369 vcc = lec_arp_resolve(priv, dst, is_rdesc, &entry); 371 vcc = lec_arp_resolve(priv, dst, is_rdesc, &entry);
370 pr_debug("%s:vcc:%p vcc_flags:%lx, entry:%p\n", dev->name, 372 pr_debug("%s:vcc:%p vcc_flags:%lx, entry:%p\n",
371 vcc, vcc ? vcc->flags : 0, entry); 373 dev->name, vcc, vcc ? vcc->flags : 0, entry);
372 if (!vcc || !test_bit(ATM_VF_READY, &vcc->flags)) { 374 if (!vcc || !test_bit(ATM_VF_READY, &vcc->flags)) {
373 if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) { 375 if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) {
374 pr_debug("%s:lec_start_xmit: queuing packet, ", 376 pr_debug("%s:queuing packet, MAC address %pM\n",
375 dev->name); 377 dev->name, lec_h->h_dest);
376 pr_debug("MAC address %pM\n", lec_h->h_dest);
377 skb_queue_tail(&entry->tx_wait, skb); 378 skb_queue_tail(&entry->tx_wait, skb);
378 } else { 379 } else {
379 pr_debug 380 pr_debug("%s:tx queue full or no arp entry, dropping, MAC address: %pM\n",
380 ("%s:lec_start_xmit: tx queue full or no arp entry, dropping, ", 381 dev->name, lec_h->h_dest);
381 dev->name);
382 pr_debug("MAC address %pM\n", lec_h->h_dest);
383 dev->stats.tx_dropped++; 382 dev->stats.tx_dropped++;
384 dev_kfree_skb(skb); 383 dev_kfree_skb(skb);
385 } 384 }
@@ -390,8 +389,7 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
390#endif /* DUMP_PACKETS > 0 */ 389#endif /* DUMP_PACKETS > 0 */
391 390
392 while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) { 391 while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) {
393 pr_debug("lec.c: emptying tx queue, "); 392 pr_debug("emptying tx queue, MAC address %pM\n", lec_h->h_dest);
394 pr_debug("MAC address %pM\n", lec_h->h_dest);
395 lec_send(vcc, skb2); 393 lec_send(vcc, skb2);
396 } 394 }
397 395
@@ -477,10 +475,10 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
477 mesg->content.normal.atm_addr, 475 mesg->content.normal.atm_addr,
478 mesg->content.normal.flag, 476 mesg->content.normal.flag,
479 mesg->content.normal.targetless_le_arp); 477 mesg->content.normal.targetless_le_arp);
480 pr_debug("lec: in l_arp_update\n"); 478 pr_debug("in l_arp_update\n");
481 if (mesg->sizeoftlvs != 0) { /* LANE2 3.1.5 */ 479 if (mesg->sizeoftlvs != 0) { /* LANE2 3.1.5 */
482 pr_debug("lec: LANE2 3.1.5, got tlvs, size %d\n", 480 pr_debug("LANE2 3.1.5, got tlvs, size %d\n",
483 mesg->sizeoftlvs); 481 mesg->sizeoftlvs);
484 lane2_associate_ind(dev, mesg->content.normal.mac_addr, 482 lane2_associate_ind(dev, mesg->content.normal.mac_addr,
485 tmp, mesg->sizeoftlvs); 483 tmp, mesg->sizeoftlvs);
486 } 484 }
@@ -531,9 +529,8 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
531 struct sk_buff *skb2; 529 struct sk_buff *skb2;
532 struct sock *sk; 530 struct sock *sk;
533 531
534 pr_debug 532 pr_debug("%s: entry found, responding to zeppelin\n",
535 ("%s: entry found, responding to zeppelin\n", 533 dev->name);
536 dev->name);
537 skb2 = 534 skb2 =
538 alloc_skb(sizeof(struct atmlec_msg), 535 alloc_skb(sizeof(struct atmlec_msg),
539 GFP_ATOMIC); 536 GFP_ATOMIC);
@@ -633,7 +630,7 @@ send_to_lecd(struct lec_priv *priv, atmlec_msg_type type,
633 sk->sk_data_ready(sk, skb->len); 630 sk->sk_data_ready(sk, skb->len);
634 631
635 if (data != NULL) { 632 if (data != NULL) {
636 pr_debug("lec: about to send %d bytes of data\n", data->len); 633 pr_debug("about to send %d bytes of data\n", data->len);
637 atm_force_charge(priv->lecd, data->truesize); 634 atm_force_charge(priv->lecd, data->truesize);
638 skb_queue_tail(&sk->sk_receive_queue, data); 635 skb_queue_tail(&sk->sk_receive_queue, data);
639 sk->sk_data_ready(sk, skb->len); 636 sk->sk_data_ready(sk, skb->len);
@@ -692,35 +689,27 @@ static void lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
692 struct lec_priv *priv = netdev_priv(dev); 689 struct lec_priv *priv = netdev_priv(dev);
693 690
694#if DUMP_PACKETS >0 691#if DUMP_PACKETS >0
695 int i = 0; 692 printk(KERN_DEBUG "%s: vcc vpi:%d vci:%d\n",
696 char buf[300]; 693 dev->name, vcc->vpi, vcc->vci);
697
698 printk("%s: lec_push vcc vpi:%d vci:%d\n", dev->name,
699 vcc->vpi, vcc->vci);
700#endif 694#endif
701 if (!skb) { 695 if (!skb) {
702 pr_debug("%s: null skb\n", dev->name); 696 pr_debug("%s: null skb\n", dev->name);
703 lec_vcc_close(priv, vcc); 697 lec_vcc_close(priv, vcc);
704 return; 698 return;
705 } 699 }
706#if DUMP_PACKETS > 0
707 printk("%s: rcv datalen:%ld lecid:%4.4x\n", dev->name,
708 skb->len, priv->lecid);
709#if DUMP_PACKETS >= 2 700#if DUMP_PACKETS >= 2
710 for (i = 0; i < skb->len && i < 99; i++) { 701#define MAX_SKB_DUMP 99
711 sprintf(buf + i * 3, "%2.2x ", 0xff & skb->data[i]);
712 }
713#elif DUMP_PACKETS >= 1 702#elif DUMP_PACKETS >= 1
714 for (i = 0; i < skb->len && i < 30; i++) { 703#define MAX_SKB_DUMP 30
715 sprintf(buf + i * 3, "%2.2x ", 0xff & skb->data[i]); 704#endif
716 } 705#if DUMP_PACKETS > 0
717#endif /* DUMP_PACKETS >= 1 */ 706 printk(KERN_DEBUG "%s: rcv datalen:%ld lecid:%4.4x\n",
718 if (i == skb->len) 707 dev->name, skb->len, priv->lecid);
719 printk("%s\n", buf); 708 print_hex_dump(KERN_DEBUG, "", DUMP_OFFSET, 16, 1,
720 else 709 skb->data, min(MAX_SKB_DUMP, skb->len), true);
721 printk("%s...\n", buf);
722#endif /* DUMP_PACKETS > 0 */ 710#endif /* DUMP_PACKETS > 0 */
723 if (memcmp(skb->data, lec_ctrl_magic, 4) == 0) { /* Control frame, to daemon */ 711 if (memcmp(skb->data, lec_ctrl_magic, 4) == 0) {
712 /* Control frame, to daemon */
724 struct sock *sk = sk_atm(vcc); 713 struct sock *sk = sk_atm(vcc);
725 714
726 pr_debug("%s: To daemon\n", dev->name); 715 pr_debug("%s: To daemon\n", dev->name);
@@ -801,7 +790,7 @@ static void lec_pop(struct atm_vcc *vcc, struct sk_buff *skb)
801 struct net_device *dev = skb->dev; 790 struct net_device *dev = skb->dev;
802 791
803 if (vpriv == NULL) { 792 if (vpriv == NULL) {
804 printk("lec_pop(): vpriv = NULL!?!?!?\n"); 793 pr_info("vpriv = NULL!?!?!?\n");
805 return; 794 return;
806 } 795 }
807 796
@@ -822,11 +811,8 @@ static int lec_vcc_attach(struct atm_vcc *vcc, void __user *arg)
822 811
823 /* Lecd must be up in this case */ 812 /* Lecd must be up in this case */
824 bytes_left = copy_from_user(&ioc_data, arg, sizeof(struct atmlec_ioc)); 813 bytes_left = copy_from_user(&ioc_data, arg, sizeof(struct atmlec_ioc));
825 if (bytes_left != 0) { 814 if (bytes_left != 0)
826 printk 815 pr_info("copy from user failed for %d bytes\n", bytes_left);
827 ("lec: lec_vcc_attach, copy from user failed for %d bytes\n",
828 bytes_left);
829 }
830 if (ioc_data.dev_num < 0 || ioc_data.dev_num >= MAX_LEC_ITF || 816 if (ioc_data.dev_num < 0 || ioc_data.dev_num >= MAX_LEC_ITF ||
831 !dev_lec[ioc_data.dev_num]) 817 !dev_lec[ioc_data.dev_num])
832 return -EINVAL; 818 return -EINVAL;
@@ -1199,7 +1185,7 @@ static int __init lane_module_init(void)
1199 1185
1200 p = proc_create("lec", S_IRUGO, atm_proc_root, &lec_seq_fops); 1186 p = proc_create("lec", S_IRUGO, atm_proc_root, &lec_seq_fops);
1201 if (!p) { 1187 if (!p) {
1202 printk(KERN_ERR "Unable to initialize /proc/net/atm/lec\n"); 1188 pr_err("Unable to initialize /proc/net/atm/lec\n");
1203 return -ENOMEM; 1189 return -ENOMEM;
1204 } 1190 }
1205#endif 1191#endif
@@ -1381,7 +1367,7 @@ static void lane2_associate_ind(struct net_device *dev, const u8 *mac_addr,
1381#if 0 1367#if 0
1382#define pr_debug(format,args...) 1368#define pr_debug(format,args...)
1383/* 1369/*
1384#define pr_debug printk 1370 #define pr_debug printk
1385*/ 1371*/
1386#endif 1372#endif
1387#define DEBUG_ARP_TABLE 0 1373#define DEBUG_ARP_TABLE 0
@@ -1450,10 +1436,7 @@ lec_arp_add(struct lec_priv *priv, struct lec_arp_table *entry)
1450 tmp = &priv->lec_arp_tables[HASH(entry->mac_addr[ETH_ALEN - 1])]; 1436 tmp = &priv->lec_arp_tables[HASH(entry->mac_addr[ETH_ALEN - 1])];
1451 hlist_add_head(&entry->next, tmp); 1437 hlist_add_head(&entry->next, tmp);
1452 1438
1453 pr_debug("LEC_ARP: Added entry:%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x\n", 1439 pr_debug("Added entry:%pM\n", entry->mac_addr);
1454 0xff & entry->mac_addr[0], 0xff & entry->mac_addr[1],
1455 0xff & entry->mac_addr[2], 0xff & entry->mac_addr[3],
1456 0xff & entry->mac_addr[4], 0xff & entry->mac_addr[5]);
1457} 1440}
1458 1441
1459/* 1442/*
@@ -1492,10 +1475,7 @@ lec_arp_remove(struct lec_priv *priv, struct lec_arp_table *to_remove)
1492 } 1475 }
1493 skb_queue_purge(&to_remove->tx_wait); /* FIXME: good place for this? */ 1476 skb_queue_purge(&to_remove->tx_wait); /* FIXME: good place for this? */
1494 1477
1495 pr_debug("LEC_ARP: Removed entry:%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x\n", 1478 pr_debug("Removed entry:%pM\n", to_remove->mac_addr);
1496 0xff & to_remove->mac_addr[0], 0xff & to_remove->mac_addr[1],
1497 0xff & to_remove->mac_addr[2], 0xff & to_remove->mac_addr[3],
1498 0xff & to_remove->mac_addr[4], 0xff & to_remove->mac_addr[5]);
1499 return 0; 1479 return 0;
1500} 1480}
1501 1481
@@ -1714,9 +1694,7 @@ static struct lec_arp_table *lec_arp_find(struct lec_priv *priv,
1714 struct hlist_head *head; 1694 struct hlist_head *head;
1715 struct lec_arp_table *entry; 1695 struct lec_arp_table *entry;
1716 1696
1717 pr_debug("LEC_ARP: lec_arp_find :%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x\n", 1697 pr_debug("%pM\n", mac_addr);
1718 mac_addr[0] & 0xff, mac_addr[1] & 0xff, mac_addr[2] & 0xff,
1719 mac_addr[3] & 0xff, mac_addr[4] & 0xff, mac_addr[5] & 0xff);
1720 1698
1721 head = &priv->lec_arp_tables[HASH(mac_addr[ETH_ALEN - 1])]; 1699 head = &priv->lec_arp_tables[HASH(mac_addr[ETH_ALEN - 1])];
1722 hlist_for_each_entry(entry, node, head, next) { 1700 hlist_for_each_entry(entry, node, head, next) {
@@ -1755,7 +1733,7 @@ static void lec_arp_expire_arp(unsigned long data)
1755 1733
1756 entry = (struct lec_arp_table *)data; 1734 entry = (struct lec_arp_table *)data;
1757 1735
1758 pr_debug("lec_arp_expire_arp\n"); 1736 pr_debug("\n");
1759 if (entry->status == ESI_ARP_PENDING) { 1737 if (entry->status == ESI_ARP_PENDING) {
1760 if (entry->no_tries <= entry->priv->max_retry_count) { 1738 if (entry->no_tries <= entry->priv->max_retry_count) {
1761 if (entry->is_rdesc) 1739 if (entry->is_rdesc)
@@ -1779,10 +1757,10 @@ static void lec_arp_expire_vcc(unsigned long data)
1779 1757
1780 del_timer(&to_remove->timer); 1758 del_timer(&to_remove->timer);
1781 1759
1782 pr_debug("LEC_ARP %p %p: lec_arp_expire_vcc vpi:%d vci:%d\n", 1760 pr_debug("%p %p: vpi:%d vci:%d\n",
1783 to_remove, priv, 1761 to_remove, priv,
1784 to_remove->vcc ? to_remove->recv_vcc->vpi : 0, 1762 to_remove->vcc ? to_remove->recv_vcc->vpi : 0,
1785 to_remove->vcc ? to_remove->recv_vcc->vci : 0); 1763 to_remove->vcc ? to_remove->recv_vcc->vci : 0);
1786 1764
1787 spin_lock_irqsave(&priv->lec_arp_lock, flags); 1765 spin_lock_irqsave(&priv->lec_arp_lock, flags);
1788 hlist_del(&to_remove->next); 1766 hlist_del(&to_remove->next);
@@ -1819,7 +1797,7 @@ static void lec_arp_check_expire(struct work_struct *work)
1819 unsigned long time_to_check; 1797 unsigned long time_to_check;
1820 int i; 1798 int i;
1821 1799
1822 pr_debug("lec_arp_check_expire %p\n", priv); 1800 pr_debug("%p\n", priv);
1823 now = jiffies; 1801 now = jiffies;
1824restart: 1802restart:
1825 spin_lock_irqsave(&priv->lec_arp_lock, flags); 1803 spin_lock_irqsave(&priv->lec_arp_lock, flags);
@@ -1832,12 +1810,12 @@ restart:
1832 time_to_check = priv->aging_time; 1810 time_to_check = priv->aging_time;
1833 1811
1834 pr_debug("About to expire: %lx - %lx > %lx\n", 1812 pr_debug("About to expire: %lx - %lx > %lx\n",
1835 now, entry->last_used, time_to_check); 1813 now, entry->last_used, time_to_check);
1836 if (time_after(now, entry->last_used + time_to_check) 1814 if (time_after(now, entry->last_used + time_to_check)
1837 && !(entry->flags & LEC_PERMANENT_FLAG) 1815 && !(entry->flags & LEC_PERMANENT_FLAG)
1838 && !(entry->mac_addr[0] & 0x01)) { /* LANE2: 7.1.20 */ 1816 && !(entry->mac_addr[0] & 0x01)) { /* LANE2: 7.1.20 */
1839 /* Remove entry */ 1817 /* Remove entry */
1840 pr_debug("LEC:Entry timed out\n"); 1818 pr_debug("Entry timed out\n");
1841 lec_arp_remove(priv, entry); 1819 lec_arp_remove(priv, entry);
1842 lec_arp_put(entry); 1820 lec_arp_put(entry);
1843 } else { 1821 } else {
@@ -1934,7 +1912,7 @@ static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv,
1934 entry->packets_flooded < 1912 entry->packets_flooded <
1935 priv->maximum_unknown_frame_count) { 1913 priv->maximum_unknown_frame_count) {
1936 entry->packets_flooded++; 1914 entry->packets_flooded++;
1937 pr_debug("LEC_ARP: Flooding..\n"); 1915 pr_debug("Flooding..\n");
1938 found = priv->mcast_vcc; 1916 found = priv->mcast_vcc;
1939 goto out; 1917 goto out;
1940 } 1918 }
@@ -1945,13 +1923,13 @@ static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv,
1945 */ 1923 */
1946 lec_arp_hold(entry); 1924 lec_arp_hold(entry);
1947 *ret_entry = entry; 1925 *ret_entry = entry;
1948 pr_debug("lec: entry->status %d entry->vcc %p\n", entry->status, 1926 pr_debug("entry->status %d entry->vcc %p\n", entry->status,
1949 entry->vcc); 1927 entry->vcc);
1950 found = NULL; 1928 found = NULL;
1951 } else { 1929 } else {
1952 /* No matching entry was found */ 1930 /* No matching entry was found */
1953 entry = make_entry(priv, mac_to_find); 1931 entry = make_entry(priv, mac_to_find);
1954 pr_debug("LEC_ARP: Making entry\n"); 1932 pr_debug("Making entry\n");
1955 if (!entry) { 1933 if (!entry) {
1956 found = priv->mcast_vcc; 1934 found = priv->mcast_vcc;
1957 goto out; 1935 goto out;
@@ -1988,7 +1966,7 @@ lec_addr_delete(struct lec_priv *priv, const unsigned char *atm_addr,
1988 struct lec_arp_table *entry; 1966 struct lec_arp_table *entry;
1989 int i; 1967 int i;
1990 1968
1991 pr_debug("lec_addr_delete\n"); 1969 pr_debug("\n");
1992 spin_lock_irqsave(&priv->lec_arp_lock, flags); 1970 spin_lock_irqsave(&priv->lec_arp_lock, flags);
1993 for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) { 1971 for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) {
1994 hlist_for_each_entry_safe(entry, node, next, &priv->lec_arp_tables[i], next) { 1972 hlist_for_each_entry_safe(entry, node, next, &priv->lec_arp_tables[i], next) {
@@ -2019,10 +1997,8 @@ lec_arp_update(struct lec_priv *priv, const unsigned char *mac_addr,
2019 struct lec_arp_table *entry, *tmp; 1997 struct lec_arp_table *entry, *tmp;
2020 int i; 1998 int i;
2021 1999
2022 pr_debug("lec:%s", (targetless_le_arp) ? "targetless " : " "); 2000 pr_debug("%smac:%pM\n",
2023 pr_debug("lec_arp_update mac:%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", 2001 (targetless_le_arp) ? "targetless " : "", mac_addr);
2024 mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3],
2025 mac_addr[4], mac_addr[5]);
2026 2002
2027 spin_lock_irqsave(&priv->lec_arp_lock, flags); 2003 spin_lock_irqsave(&priv->lec_arp_lock, flags);
2028 entry = lec_arp_find(priv, mac_addr); 2004 entry = lec_arp_find(priv, mac_addr);
@@ -2149,19 +2125,17 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data,
2149 * Vcc which we don't want to make default vcc, 2125 * Vcc which we don't want to make default vcc,
2150 * attach it anyway. 2126 * attach it anyway.
2151 */ 2127 */
2152 pr_debug 2128 pr_debug("LEC_ARP:Attaching data direct, not default: %2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n",
2153 ("LEC_ARP:Attaching data direct, not default: " 2129 ioc_data->atm_addr[0], ioc_data->atm_addr[1],
2154 "%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", 2130 ioc_data->atm_addr[2], ioc_data->atm_addr[3],
2155 ioc_data->atm_addr[0], ioc_data->atm_addr[1], 2131 ioc_data->atm_addr[4], ioc_data->atm_addr[5],
2156 ioc_data->atm_addr[2], ioc_data->atm_addr[3], 2132 ioc_data->atm_addr[6], ioc_data->atm_addr[7],
2157 ioc_data->atm_addr[4], ioc_data->atm_addr[5], 2133 ioc_data->atm_addr[8], ioc_data->atm_addr[9],
2158 ioc_data->atm_addr[6], ioc_data->atm_addr[7], 2134 ioc_data->atm_addr[10], ioc_data->atm_addr[11],
2159 ioc_data->atm_addr[8], ioc_data->atm_addr[9], 2135 ioc_data->atm_addr[12], ioc_data->atm_addr[13],
2160 ioc_data->atm_addr[10], ioc_data->atm_addr[11], 2136 ioc_data->atm_addr[14], ioc_data->atm_addr[15],
2161 ioc_data->atm_addr[12], ioc_data->atm_addr[13], 2137 ioc_data->atm_addr[16], ioc_data->atm_addr[17],
2162 ioc_data->atm_addr[14], ioc_data->atm_addr[15], 2138 ioc_data->atm_addr[18], ioc_data->atm_addr[19]);
2163 ioc_data->atm_addr[16], ioc_data->atm_addr[17],
2164 ioc_data->atm_addr[18], ioc_data->atm_addr[19]);
2165 entry = make_entry(priv, bus_mac); 2139 entry = make_entry(priv, bus_mac);
2166 if (entry == NULL) 2140 if (entry == NULL)
2167 goto out; 2141 goto out;
@@ -2177,19 +2151,17 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data,
2177 dump_arp_table(priv); 2151 dump_arp_table(priv);
2178 goto out; 2152 goto out;
2179 } 2153 }
2180 pr_debug 2154 pr_debug("LEC_ARP:Attaching data direct, default: %2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n",
2181 ("LEC_ARP:Attaching data direct, default: " 2155 ioc_data->atm_addr[0], ioc_data->atm_addr[1],
2182 "%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", 2156 ioc_data->atm_addr[2], ioc_data->atm_addr[3],
2183 ioc_data->atm_addr[0], ioc_data->atm_addr[1], 2157 ioc_data->atm_addr[4], ioc_data->atm_addr[5],
2184 ioc_data->atm_addr[2], ioc_data->atm_addr[3], 2158 ioc_data->atm_addr[6], ioc_data->atm_addr[7],
2185 ioc_data->atm_addr[4], ioc_data->atm_addr[5], 2159 ioc_data->atm_addr[8], ioc_data->atm_addr[9],
2186 ioc_data->atm_addr[6], ioc_data->atm_addr[7], 2160 ioc_data->atm_addr[10], ioc_data->atm_addr[11],
2187 ioc_data->atm_addr[8], ioc_data->atm_addr[9], 2161 ioc_data->atm_addr[12], ioc_data->atm_addr[13],
2188 ioc_data->atm_addr[10], ioc_data->atm_addr[11], 2162 ioc_data->atm_addr[14], ioc_data->atm_addr[15],
2189 ioc_data->atm_addr[12], ioc_data->atm_addr[13], 2163 ioc_data->atm_addr[16], ioc_data->atm_addr[17],
2190 ioc_data->atm_addr[14], ioc_data->atm_addr[15], 2164 ioc_data->atm_addr[18], ioc_data->atm_addr[19]);
2191 ioc_data->atm_addr[16], ioc_data->atm_addr[17],
2192 ioc_data->atm_addr[18], ioc_data->atm_addr[19]);
2193 for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) { 2165 for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) {
2194 hlist_for_each_entry(entry, node, &priv->lec_arp_tables[i], next) { 2166 hlist_for_each_entry(entry, node, &priv->lec_arp_tables[i], next) {
2195 if (memcmp 2167 if (memcmp
@@ -2197,9 +2169,9 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data,
2197 ATM_ESA_LEN) == 0) { 2169 ATM_ESA_LEN) == 0) {
2198 pr_debug("LEC_ARP: Attaching data direct\n"); 2170 pr_debug("LEC_ARP: Attaching data direct\n");
2199 pr_debug("Currently -> Vcc: %d, Rvcc:%d\n", 2171 pr_debug("Currently -> Vcc: %d, Rvcc:%d\n",
2200 entry->vcc ? entry->vcc->vci : 0, 2172 entry->vcc ? entry->vcc->vci : 0,
2201 entry->recv_vcc ? entry->recv_vcc-> 2173 entry->recv_vcc ? entry->recv_vcc->
2202 vci : 0); 2174 vci : 0);
2203 found_entry = 1; 2175 found_entry = 1;
2204 del_timer(&entry->timer); 2176 del_timer(&entry->timer);
2205 entry->vcc = vcc; 2177 entry->vcc = vcc;
@@ -2271,7 +2243,7 @@ static void lec_flush_complete(struct lec_priv *priv, unsigned long tran_id)
2271 struct lec_arp_table *entry; 2243 struct lec_arp_table *entry;
2272 int i; 2244 int i;
2273 2245
2274 pr_debug("LEC:lec_flush_complete %lx\n", tran_id); 2246 pr_debug("%lx\n", tran_id);
2275restart: 2247restart:
2276 spin_lock_irqsave(&priv->lec_arp_lock, flags); 2248 spin_lock_irqsave(&priv->lec_arp_lock, flags);
2277 for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) { 2249 for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) {
@@ -2312,7 +2284,7 @@ lec_set_flush_tran_id(struct lec_priv *priv,
2312 if (!memcmp(atm_addr, entry->atm_addr, ATM_ESA_LEN)) { 2284 if (!memcmp(atm_addr, entry->atm_addr, ATM_ESA_LEN)) {
2313 entry->flush_tran_id = tran_id; 2285 entry->flush_tran_id = tran_id;
2314 pr_debug("Set flush transaction id to %lx for %p\n", 2286 pr_debug("Set flush transaction id to %lx for %p\n",
2315 tran_id, entry); 2287 tran_id, entry);
2316 } 2288 }
2317 } 2289 }
2318 spin_unlock_irqrestore(&priv->lec_arp_lock, flags); 2290 spin_unlock_irqrestore(&priv->lec_arp_lock, flags);
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 38a6cb0863f0..3c45aef47b7e 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -1,3 +1,5 @@
1#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
2
1#include <linux/kernel.h> 3#include <linux/kernel.h>
2#include <linux/string.h> 4#include <linux/string.h>
3#include <linux/timer.h> 5#include <linux/timer.h>
@@ -1447,7 +1449,7 @@ static __init int atm_mpoa_init(void)
1447 register_atm_ioctl(&atm_ioctl_ops); 1449 register_atm_ioctl(&atm_ioctl_ops);
1448 1450
1449 if (mpc_proc_init() != 0) 1451 if (mpc_proc_init() != 0)
1450 printk(KERN_INFO "mpoa: failed to initialize /proc/mpoa\n"); 1452 pr_info("failed to initialize /proc/mpoa\n");
1451 1453
1452 printk("mpc.c: " __DATE__ " " __TIME__ " initialized\n"); 1454 printk("mpc.c: " __DATE__ " " __TIME__ " initialized\n");
1453 1455
diff --git a/net/atm/mpoa_proc.c b/net/atm/mpoa_proc.c
index 1a0f5ccea9c4..0603ab478cf5 100644
--- a/net/atm/mpoa_proc.c
+++ b/net/atm/mpoa_proc.c
@@ -1,3 +1,4 @@
1#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
1 2
2#ifdef CONFIG_PROC_FS 3#ifdef CONFIG_PROC_FS
3#include <linux/errno.h> 4#include <linux/errno.h>
@@ -278,7 +279,7 @@ int mpc_proc_init(void)
278 279
279 p = proc_create(STAT_FILE_NAME, 0, atm_proc_root, &mpc_file_operations); 280 p = proc_create(STAT_FILE_NAME, 0, atm_proc_root, &mpc_file_operations);
280 if (!p) { 281 if (!p) {
281 printk(KERN_ERR "Unable to initialize /proc/atm/%s\n", STAT_FILE_NAME); 282 pr_err("Unable to initialize /proc/atm/%s\n", STAT_FILE_NAME);
282 return -ENOMEM; 283 return -ENOMEM;
283 } 284 }
284 return 0; 285 return 0;
diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c
index 0af84cd4f65b..62db6d71dbab 100644
--- a/net/atm/pppoatm.c
+++ b/net/atm/pppoatm.c
@@ -33,6 +33,8 @@
33 * These hooks are not yet available in ppp_generic 33 * These hooks are not yet available in ppp_generic
34 */ 34 */
35 35
36#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
37
36#include <linux/module.h> 38#include <linux/module.h>
37#include <linux/init.h> 39#include <linux/init.h>
38#include <linux/skbuff.h> 40#include <linux/skbuff.h>
@@ -132,7 +134,7 @@ static void pppoatm_unassign_vcc(struct atm_vcc *atmvcc)
132static void pppoatm_push(struct atm_vcc *atmvcc, struct sk_buff *skb) 134static void pppoatm_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
133{ 135{
134 struct pppoatm_vcc *pvcc = atmvcc_to_pvcc(atmvcc); 136 struct pppoatm_vcc *pvcc = atmvcc_to_pvcc(atmvcc);
135 pr_debug("pppoatm push\n"); 137 pr_debug("\n");
136 if (skb == NULL) { /* VCC was closed */ 138 if (skb == NULL) { /* VCC was closed */
137 pr_debug("removing ATMPPP VCC %p\n", pvcc); 139 pr_debug("removing ATMPPP VCC %p\n", pvcc);
138 pppoatm_unassign_vcc(atmvcc); 140 pppoatm_unassign_vcc(atmvcc);
@@ -165,10 +167,9 @@ static void pppoatm_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
165 pvcc->chan.mtu += LLC_LEN; 167 pvcc->chan.mtu += LLC_LEN;
166 break; 168 break;
167 } 169 }
168 pr_debug("Couldn't autodetect yet " 170 pr_debug("Couldn't autodetect yet (skb: %02X %02X %02X %02X %02X %02X)\n",
169 "(skb: %02X %02X %02X %02X %02X %02X)\n", 171 skb->data[0], skb->data[1], skb->data[2],
170 skb->data[0], skb->data[1], skb->data[2], 172 skb->data[3], skb->data[4], skb->data[5]);
171 skb->data[3], skb->data[4], skb->data[5]);
172 goto error; 173 goto error;
173 case e_vc: 174 case e_vc:
174 break; 175 break;
@@ -194,7 +195,7 @@ static int pppoatm_send(struct ppp_channel *chan, struct sk_buff *skb)
194{ 195{
195 struct pppoatm_vcc *pvcc = chan_to_pvcc(chan); 196 struct pppoatm_vcc *pvcc = chan_to_pvcc(chan);
196 ATM_SKB(skb)->vcc = pvcc->atmvcc; 197 ATM_SKB(skb)->vcc = pvcc->atmvcc;
197 pr_debug("pppoatm_send (skb=0x%p, vcc=0x%p)\n", skb, pvcc->atmvcc); 198 pr_debug("(skb=0x%p, vcc=0x%p)\n", skb, pvcc->atmvcc);
198 if (skb->data[0] == '\0' && (pvcc->flags & SC_COMP_PROT)) 199 if (skb->data[0] == '\0' && (pvcc->flags & SC_COMP_PROT))
199 (void) skb_pull(skb, 1); 200 (void) skb_pull(skb, 1);
200 switch (pvcc->encaps) { /* LLC encapsulation needed */ 201 switch (pvcc->encaps) { /* LLC encapsulation needed */
@@ -226,8 +227,8 @@ static int pppoatm_send(struct ppp_channel *chan, struct sk_buff *skb)
226 227
227 atomic_add(skb->truesize, &sk_atm(ATM_SKB(skb)->vcc)->sk_wmem_alloc); 228 atomic_add(skb->truesize, &sk_atm(ATM_SKB(skb)->vcc)->sk_wmem_alloc);
228 ATM_SKB(skb)->atm_options = ATM_SKB(skb)->vcc->atm_options; 229 ATM_SKB(skb)->atm_options = ATM_SKB(skb)->vcc->atm_options;
229 pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, ATM_SKB(skb)->vcc, 230 pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n",
230 ATM_SKB(skb)->vcc->dev); 231 skb, ATM_SKB(skb)->vcc, ATM_SKB(skb)->vcc->dev);
231 return ATM_SKB(skb)->vcc->send(ATM_SKB(skb)->vcc, skb) 232 return ATM_SKB(skb)->vcc->send(ATM_SKB(skb)->vcc, skb)
232 ? DROP_PACKET : 1; 233 ? DROP_PACKET : 1;
233 nospace: 234 nospace:
diff --git a/net/atm/raw.c b/net/atm/raw.c
index cbfcc71a17b1..fb8a9497653c 100644
--- a/net/atm/raw.c
+++ b/net/atm/raw.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/module.h> 7#include <linux/module.h>
7#include <linux/atmdev.h> 8#include <linux/atmdev.h>
@@ -32,8 +33,8 @@ static void atm_pop_raw(struct atm_vcc *vcc,struct sk_buff *skb)
32{ 33{
33 struct sock *sk = sk_atm(vcc); 34 struct sock *sk = sk_atm(vcc);
34 35
35 pr_debug("APopR (%d) %d -= %d\n", vcc->vci, 36 pr_debug("(%d) %d -= %d\n",
36 sk_wmem_alloc_get(sk), skb->truesize); 37 vcc->vci, sk_wmem_alloc_get(sk), skb->truesize);
37 atomic_sub(skb->truesize, &sk->sk_wmem_alloc); 38 atomic_sub(skb->truesize, &sk->sk_wmem_alloc);
38 dev_kfree_skb_any(skb); 39 dev_kfree_skb_any(skb);
39 sk->sk_write_space(sk); 40 sk->sk_write_space(sk);
diff --git a/net/atm/resources.c b/net/atm/resources.c
index 56b7322ff461..0d4c0ee090db 100644
--- a/net/atm/resources.c
+++ b/net/atm/resources.c
@@ -7,6 +7,7 @@
7 * 2002/01 - don't free the whole struct sock on sk->destruct time, 7 * 2002/01 - don't free the whole struct sock on sk->destruct time,
8 * use the default destruct function initialized by sock_init_data */ 8 * use the default destruct function initialized by sock_init_data */
9 9
10#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
10 11
11#include <linux/ctype.h> 12#include <linux/ctype.h>
12#include <linux/string.h> 13#include <linux/string.h>
@@ -79,8 +80,7 @@ struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops,
79 80
80 dev = __alloc_atm_dev(type); 81 dev = __alloc_atm_dev(type);
81 if (!dev) { 82 if (!dev) {
82 printk(KERN_ERR "atm_dev_register: no space for dev %s\n", 83 pr_err("no space for dev %s\n", type);
83 type);
84 return NULL; 84 return NULL;
85 } 85 }
86 mutex_lock(&atm_dev_mutex); 86 mutex_lock(&atm_dev_mutex);
@@ -109,16 +109,12 @@ struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops,
109 atomic_set(&dev->refcnt, 1); 109 atomic_set(&dev->refcnt, 1);
110 110
111 if (atm_proc_dev_register(dev) < 0) { 111 if (atm_proc_dev_register(dev) < 0) {
112 printk(KERN_ERR "atm_dev_register: " 112 pr_err("atm_proc_dev_register failed for dev %s\n", type);
113 "atm_proc_dev_register failed for dev %s\n",
114 type);
115 goto out_fail; 113 goto out_fail;
116 } 114 }
117 115
118 if (atm_register_sysfs(dev) < 0) { 116 if (atm_register_sysfs(dev) < 0) {
119 printk(KERN_ERR "atm_dev_register: " 117 pr_err("atm_register_sysfs failed for dev %s\n", type);
120 "atm_register_sysfs failed for dev %s\n",
121 type);
122 atm_proc_dev_deregister(dev); 118 atm_proc_dev_deregister(dev);
123 goto out_fail; 119 goto out_fail;
124 } 120 }
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 = {
256int sigd_attach(struct atm_vcc *vcc) 255int 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));
diff --git a/net/atm/svc.c b/net/atm/svc.c
index 66e1d9b3e5de..251ddbc42e4b 100644
--- a/net/atm/svc.c
+++ b/net/atm/svc.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/string.h> 7#include <linux/string.h>
7#include <linux/net.h> /* struct socket, struct proto_ops */ 8#include <linux/net.h> /* struct socket, struct proto_ops */
@@ -46,7 +47,7 @@ static void svc_disconnect(struct atm_vcc *vcc)
46 struct sk_buff *skb; 47 struct sk_buff *skb;
47 struct sock *sk = sk_atm(vcc); 48 struct sock *sk = sk_atm(vcc);
48 49
49 pr_debug("svc_disconnect %p\n",vcc); 50 pr_debug("%p\n",vcc);
50 if (test_bit(ATM_VF_REGIS,&vcc->flags)) { 51 if (test_bit(ATM_VF_REGIS,&vcc->flags)) {
51 prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); 52 prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE);
52 sigd_enq(vcc,as_close,NULL,NULL,NULL); 53 sigd_enq(vcc,as_close,NULL,NULL,NULL);
@@ -76,7 +77,7 @@ static int svc_release(struct socket *sock)
76 77
77 if (sk) { 78 if (sk) {
78 vcc = ATM_SD(sock); 79 vcc = ATM_SD(sock);
79 pr_debug("svc_release %p\n", vcc); 80 pr_debug("%p\n", vcc);
80 clear_bit(ATM_VF_READY, &vcc->flags); 81 clear_bit(ATM_VF_READY, &vcc->flags);
81 /* VCC pointer is used as a reference, so we must not free it 82 /* VCC pointer is used as a reference, so we must not free it
82 (thereby subjecting it to re-use) before all pending connections 83 (thereby subjecting it to re-use) before all pending connections
@@ -153,7 +154,7 @@ static int svc_connect(struct socket *sock,struct sockaddr *sockaddr,
153 struct atm_vcc *vcc = ATM_SD(sock); 154 struct atm_vcc *vcc = ATM_SD(sock);
154 int error; 155 int error;
155 156
156 pr_debug("svc_connect %p\n",vcc); 157 pr_debug("%p\n",vcc);
157 lock_sock(sk); 158 lock_sock(sk);
158 if (sockaddr_len != sizeof(struct sockaddr_atmsvc)) { 159 if (sockaddr_len != sizeof(struct sockaddr_atmsvc)) {
159 error = -EINVAL; 160 error = -EINVAL;
@@ -286,7 +287,7 @@ static int svc_listen(struct socket *sock,int backlog)
286 struct atm_vcc *vcc = ATM_SD(sock); 287 struct atm_vcc *vcc = ATM_SD(sock);
287 int error; 288 int error;
288 289
289 pr_debug("svc_listen %p\n",vcc); 290 pr_debug("%p\n", vcc);
290 lock_sock(sk); 291 lock_sock(sk);
291 /* let server handle listen on unbound sockets */ 292 /* let server handle listen on unbound sockets */
292 if (test_bit(ATM_VF_SESSION,&vcc->flags)) { 293 if (test_bit(ATM_VF_SESSION,&vcc->flags)) {
@@ -336,7 +337,7 @@ static int svc_accept(struct socket *sock,struct socket *newsock,int flags)
336 337
337 new_vcc = ATM_SD(newsock); 338 new_vcc = ATM_SD(newsock);
338 339
339 pr_debug("svc_accept %p -> %p\n",old_vcc,new_vcc); 340 pr_debug("%p -> %p\n", old_vcc, new_vcc);
340 while (1) { 341 while (1) {
341 DEFINE_WAIT(wait); 342 DEFINE_WAIT(wait);
342 343
@@ -540,7 +541,7 @@ static int svc_addparty(struct socket *sock, struct sockaddr *sockaddr,
540 error = -EINPROGRESS; 541 error = -EINPROGRESS;
541 goto out; 542 goto out;
542 } 543 }
543 pr_debug("svc_addparty added wait queue\n"); 544 pr_debug("added wait queue\n");
544 while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) { 545 while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) {
545 schedule(); 546 schedule();
546 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); 547 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE);