netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [NET] atm: Fix build errors after conversion to pr_debug()
Date: Mon, 27 Aug 2007 10:05:37 +0200	[thread overview]
Message-ID: <20070827080536.GC894@postel.suug.ch> (raw)

Fixes ancient ATM debug code to at least compile again.

Signed-off-by: Thomas Graf <tgraf@suug.ch>

Index: net-2.6.24/net/atm/signaling.c
===================================================================
--- net-2.6.24.orig/net/atm/signaling.c	2007-08-27 09:53:40.000000000 +0200
+++ net-2.6.24/net/atm/signaling.c	2007-08-27 09:55:16.000000000 +0200
@@ -89,9 +89,9 @@ static int sigd_send(struct atm_vcc *vcc
 
 	msg = (struct atmsvc_msg *) skb->data;
 	atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
-	pr_debug("sigd_send %d (0x%lx)\n",(int) msg->type,
-	  (unsigned long) msg->vcc);
 	vcc = *(struct atm_vcc **) &msg->vcc;
+	pr_debug("sigd_send %d (0x%lx)\n",(int) msg->type,
+	  (unsigned long) vcc);
 	sk = sk_atm(vcc);
 
 	switch (msg->type) {
Index: net-2.6.24/net/atm/common.c
===================================================================
--- net-2.6.24.orig/net/atm/common.c	2007-08-27 09:56:06.000000000 +0200
+++ net-2.6.24/net/atm/common.c	2007-08-27 09:56:16.000000000 +0200
@@ -497,7 +497,7 @@ int vcc_recvmsg(struct kiocb *iocb, stru
 	if (error)
 		return error;
 	sock_recv_timestamp(msg, sk, skb);
-	pr_debug("RcvM %d -= %d\n", atomic_read(&sk->rmem_alloc), skb->truesize);
+	pr_debug("RcvM %d -= %d\n", atomic_read(&sk->sk_rmem_alloc), skb->truesize);
 	atm_return(vcc, skb->truesize);
 	skb_free_datagram(sk, skb);
 	return copied;
Index: net-2.6.24/net/atm/raw.c
===================================================================
--- net-2.6.24.orig/net/atm/raw.c	2007-08-27 09:57:56.000000000 +0200
+++ net-2.6.24/net/atm/raw.c	2007-08-27 09:58:09.000000000 +0200
@@ -32,8 +32,8 @@ static void atm_pop_raw(struct atm_vcc *
 {
 	struct sock *sk = sk_atm(vcc);
 
-	pr_debug("APopR (%d) %d -= %d\n", vcc->vci, sk->sk_wmem_alloc,
-		skb->truesize);
+	pr_debug("APopR (%d) %d -= %d\n", vcc->vci,
+		atomic_read(&sk->sk_wmem_alloc), skb->truesize);
 	atomic_sub(skb->truesize, &sk->sk_wmem_alloc);
 	dev_kfree_skb_any(skb);
 	sk->sk_write_space(sk);
Index: net-2.6.24/net/atm/pppoatm.c
===================================================================
--- net-2.6.24.orig/net/atm/pppoatm.c	2007-08-27 10:01:34.000000000 +0200
+++ net-2.6.24/net/atm/pppoatm.c	2007-08-27 10:02:05.000000000 +0200
@@ -165,9 +165,8 @@ static void pppoatm_push(struct atm_vcc 
 			pvcc->chan.mtu += LLC_LEN;
 			break;
 		}
-		pr_debug("(unit %d): Couldn't autodetect yet "
+		pr_debug("Couldn't autodetect yet "
 		    "(skb: %02X %02X %02X %02X %02X %02X)\n",
-		    pvcc->chan.unit,
 		    skb->data[0], skb->data[1], skb->data[2],
 		    skb->data[3], skb->data[4], skb->data[5]);
 		goto error;
@@ -195,8 +194,7 @@ static int pppoatm_send(struct ppp_chann
 {
 	struct pppoatm_vcc *pvcc = chan_to_pvcc(chan);
 	ATM_SKB(skb)->vcc = pvcc->atmvcc;
-	pr_debug("(unit %d): pppoatm_send (skb=0x%p, vcc=0x%p)\n",
-	    pvcc->chan.unit, skb, pvcc->atmvcc);
+	pr_debug("pppoatm_send (skb=0x%p, vcc=0x%p)\n", skb, pvcc->atmvcc);
 	if (skb->data[0] == '\0' && (pvcc->flags & SC_COMP_PROT))
 		(void) skb_pull(skb, 1);
 	switch (pvcc->encaps) {		/* LLC encapsulation needed */
@@ -221,16 +219,14 @@ static int pppoatm_send(struct ppp_chann
 			goto nospace;
 		break;
 	case e_autodetect:
-		pr_debug("(unit %d): Trying to send without setting encaps!\n",
-		    pvcc->chan.unit);
+		pr_debug("Trying to send without setting encaps!\n");
 		kfree_skb(skb);
 		return 1;
 	}
 
 	atomic_add(skb->truesize, &sk_atm(ATM_SKB(skb)->vcc)->sk_wmem_alloc);
 	ATM_SKB(skb)->atm_options = ATM_SKB(skb)->vcc->atm_options;
-	pr_debug("(unit %d): atm_skb(%p)->vcc(%p)->dev(%p)\n",
-	    pvcc->chan.unit, skb, ATM_SKB(skb)->vcc,
+	pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, ATM_SKB(skb)->vcc,
 	    ATM_SKB(skb)->vcc->dev);
 	return ATM_SKB(skb)->vcc->send(ATM_SKB(skb)->vcc, skb)
 	    ? DROP_PACKET : 1;

             reply	other threads:[~2007-08-27  8:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27  8:05 Thomas Graf [this message]
2007-08-27  8:13 ` [NET] atm: Fix build errors after conversion to pr_debug() David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070827080536.GC894@postel.suug.ch \
    --to=tgraf@suug.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).