diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2011-04-14 03:20:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-14 03:20:07 -0400 |
commit | 8849b720e9632acef139a349f9ec62e63ce7e497 (patch) | |
tree | 20ac2cb94562d4d6b1a531dc8866eff62d5e755a | |
parent | 45a5f720fe37d21059da3c333c373c845ccbd82b (diff) |
NET: AX.25, NETROM, ROSE: Remove SOCK_DEBUG calls
Nobody alive seems to recall when they last were useful.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ax25/af_ax25.c | 16 | ||||
-rw-r--r-- | net/netrom/af_netrom.c | 12 | ||||
-rw-r--r-- | net/rose/af_rose.c | 16 |
3 files changed, 4 insertions, 40 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 6da5daeebab..e7c69f4619e 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -1538,8 +1538,6 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1538 | } | 1538 | } |
1539 | 1539 | ||
1540 | /* Build a packet */ | 1540 | /* Build a packet */ |
1541 | SOCK_DEBUG(sk, "AX.25: sendto: Addresses built. Building packet.\n"); | ||
1542 | |||
1543 | /* Assume the worst case */ | 1541 | /* Assume the worst case */ |
1544 | size = len + ax25->ax25_dev->dev->hard_header_len; | 1542 | size = len + ax25->ax25_dev->dev->hard_header_len; |
1545 | 1543 | ||
@@ -1549,8 +1547,6 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1549 | 1547 | ||
1550 | skb_reserve(skb, size - len); | 1548 | skb_reserve(skb, size - len); |
1551 | 1549 | ||
1552 | SOCK_DEBUG(sk, "AX.25: Appending user data\n"); | ||
1553 | |||
1554 | /* User data follows immediately after the AX.25 data */ | 1550 | /* User data follows immediately after the AX.25 data */ |
1555 | if (memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len)) { | 1551 | if (memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len)) { |
1556 | err = -EFAULT; | 1552 | err = -EFAULT; |
@@ -1564,8 +1560,6 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1564 | if (!ax25->pidincl) | 1560 | if (!ax25->pidincl) |
1565 | *skb_push(skb, 1) = sk->sk_protocol; | 1561 | *skb_push(skb, 1) = sk->sk_protocol; |
1566 | 1562 | ||
1567 | SOCK_DEBUG(sk, "AX.25: Transmitting buffer\n"); | ||
1568 | |||
1569 | if (sk->sk_type == SOCK_SEQPACKET) { | 1563 | if (sk->sk_type == SOCK_SEQPACKET) { |
1570 | /* Connected mode sockets go via the LAPB machine */ | 1564 | /* Connected mode sockets go via the LAPB machine */ |
1571 | if (sk->sk_state != TCP_ESTABLISHED) { | 1565 | if (sk->sk_state != TCP_ESTABLISHED) { |
@@ -1583,22 +1577,14 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1583 | 1577 | ||
1584 | skb_push(skb, 1 + ax25_addr_size(dp)); | 1578 | skb_push(skb, 1 + ax25_addr_size(dp)); |
1585 | 1579 | ||
1586 | SOCK_DEBUG(sk, "Building AX.25 Header (dp=%p).\n", dp); | 1580 | /* Building AX.25 Header */ |
1587 | |||
1588 | if (dp != NULL) | ||
1589 | SOCK_DEBUG(sk, "Num digipeaters=%d\n", dp->ndigi); | ||
1590 | 1581 | ||
1591 | /* Build an AX.25 header */ | 1582 | /* Build an AX.25 header */ |
1592 | lv = ax25_addr_build(skb->data, &ax25->source_addr, &sax.sax25_call, | 1583 | lv = ax25_addr_build(skb->data, &ax25->source_addr, &sax.sax25_call, |
1593 | dp, AX25_COMMAND, AX25_MODULUS); | 1584 | dp, AX25_COMMAND, AX25_MODULUS); |
1594 | 1585 | ||
1595 | SOCK_DEBUG(sk, "Built header (%d bytes)\n",lv); | ||
1596 | |||
1597 | skb_set_transport_header(skb, lv); | 1586 | skb_set_transport_header(skb, lv); |
1598 | 1587 | ||
1599 | SOCK_DEBUG(sk, "base=%p pos=%p\n", | ||
1600 | skb->data, skb_transport_header(skb)); | ||
1601 | |||
1602 | *skb_transport_header(skb) = AX25_UI; | 1588 | *skb_transport_header(skb) = AX25_UI; |
1603 | 1589 | ||
1604 | /* Datagram frames go straight out of the door as UI */ | 1590 | /* Datagram frames go straight out of the door as UI */ |
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 06cb02796a0..732152f718e 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -591,7 +591,6 @@ static int nr_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
591 | return -EINVAL; | 591 | return -EINVAL; |
592 | } | 592 | } |
593 | if ((dev = nr_dev_get(&addr->fsa_ax25.sax25_call)) == NULL) { | 593 | if ((dev = nr_dev_get(&addr->fsa_ax25.sax25_call)) == NULL) { |
594 | SOCK_DEBUG(sk, "NET/ROM: bind failed: invalid node callsign\n"); | ||
595 | release_sock(sk); | 594 | release_sock(sk); |
596 | return -EADDRNOTAVAIL; | 595 | return -EADDRNOTAVAIL; |
597 | } | 596 | } |
@@ -632,7 +631,7 @@ static int nr_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
632 | sock_reset_flag(sk, SOCK_ZAPPED); | 631 | sock_reset_flag(sk, SOCK_ZAPPED); |
633 | dev_put(dev); | 632 | dev_put(dev); |
634 | release_sock(sk); | 633 | release_sock(sk); |
635 | SOCK_DEBUG(sk, "NET/ROM: socket is bound\n"); | 634 | |
636 | return 0; | 635 | return 0; |
637 | } | 636 | } |
638 | 637 | ||
@@ -1082,8 +1081,6 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1082 | sax.sax25_call = nr->dest_addr; | 1081 | sax.sax25_call = nr->dest_addr; |
1083 | } | 1082 | } |
1084 | 1083 | ||
1085 | SOCK_DEBUG(sk, "NET/ROM: sendto: Addresses built.\n"); | ||
1086 | |||
1087 | /* Build a packet - the conventional user limit is 236 bytes. We can | 1084 | /* Build a packet - the conventional user limit is 236 bytes. We can |
1088 | do ludicrously large NetROM frames but must not overflow */ | 1085 | do ludicrously large NetROM frames but must not overflow */ |
1089 | if (len > 65536) { | 1086 | if (len > 65536) { |
@@ -1091,7 +1088,6 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1091 | goto out; | 1088 | goto out; |
1092 | } | 1089 | } |
1093 | 1090 | ||
1094 | SOCK_DEBUG(sk, "NET/ROM: sendto: building packet.\n"); | ||
1095 | size = len + NR_NETWORK_LEN + NR_TRANSPORT_LEN; | 1091 | size = len + NR_NETWORK_LEN + NR_TRANSPORT_LEN; |
1096 | 1092 | ||
1097 | if ((skb = sock_alloc_send_skb(sk, size, msg->msg_flags & MSG_DONTWAIT, &err)) == NULL) | 1093 | if ((skb = sock_alloc_send_skb(sk, size, msg->msg_flags & MSG_DONTWAIT, &err)) == NULL) |
@@ -1105,7 +1101,6 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1105 | */ | 1101 | */ |
1106 | 1102 | ||
1107 | asmptr = skb_push(skb, NR_TRANSPORT_LEN); | 1103 | asmptr = skb_push(skb, NR_TRANSPORT_LEN); |
1108 | SOCK_DEBUG(sk, "Building NET/ROM Header.\n"); | ||
1109 | 1104 | ||
1110 | /* Build a NET/ROM Transport header */ | 1105 | /* Build a NET/ROM Transport header */ |
1111 | 1106 | ||
@@ -1114,15 +1109,12 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1114 | *asmptr++ = 0; /* To be filled in later */ | 1109 | *asmptr++ = 0; /* To be filled in later */ |
1115 | *asmptr++ = 0; /* Ditto */ | 1110 | *asmptr++ = 0; /* Ditto */ |
1116 | *asmptr++ = NR_INFO; | 1111 | *asmptr++ = NR_INFO; |
1117 | SOCK_DEBUG(sk, "Built header.\n"); | ||
1118 | 1112 | ||
1119 | /* | 1113 | /* |
1120 | * Put the data on the end | 1114 | * Put the data on the end |
1121 | */ | 1115 | */ |
1122 | skb_put(skb, len); | 1116 | skb_put(skb, len); |
1123 | 1117 | ||
1124 | SOCK_DEBUG(sk, "NET/ROM: Appending user data\n"); | ||
1125 | |||
1126 | /* User data follows immediately after the NET/ROM transport header */ | 1118 | /* User data follows immediately after the NET/ROM transport header */ |
1127 | if (memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len)) { | 1119 | if (memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len)) { |
1128 | kfree_skb(skb); | 1120 | kfree_skb(skb); |
@@ -1130,8 +1122,6 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1130 | goto out; | 1122 | goto out; |
1131 | } | 1123 | } |
1132 | 1124 | ||
1133 | SOCK_DEBUG(sk, "NET/ROM: Transmitting buffer\n"); | ||
1134 | |||
1135 | if (sk->sk_state != TCP_ESTABLISHED) { | 1125 | if (sk->sk_state != TCP_ESTABLISHED) { |
1136 | kfree_skb(skb); | 1126 | kfree_skb(skb); |
1137 | err = -ENOTCONN; | 1127 | err = -ENOTCONN; |
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index a80aef6e3d1..f9ea925ad9c 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -682,10 +682,8 @@ static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
682 | if ((unsigned int) addr->srose_ndigis > ROSE_MAX_DIGIS) | 682 | if ((unsigned int) addr->srose_ndigis > ROSE_MAX_DIGIS) |
683 | return -EINVAL; | 683 | return -EINVAL; |
684 | 684 | ||
685 | if ((dev = rose_dev_get(&addr->srose_addr)) == NULL) { | 685 | if ((dev = rose_dev_get(&addr->srose_addr)) == NULL) |
686 | SOCK_DEBUG(sk, "ROSE: bind failed: invalid address\n"); | ||
687 | return -EADDRNOTAVAIL; | 686 | return -EADDRNOTAVAIL; |
688 | } | ||
689 | 687 | ||
690 | source = &addr->srose_call; | 688 | source = &addr->srose_call; |
691 | 689 | ||
@@ -716,7 +714,7 @@ static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
716 | rose_insert_socket(sk); | 714 | rose_insert_socket(sk); |
717 | 715 | ||
718 | sock_reset_flag(sk, SOCK_ZAPPED); | 716 | sock_reset_flag(sk, SOCK_ZAPPED); |
719 | SOCK_DEBUG(sk, "ROSE: socket is bound\n"); | 717 | |
720 | return 0; | 718 | return 0; |
721 | } | 719 | } |
722 | 720 | ||
@@ -1109,10 +1107,7 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1109 | srose.srose_digis[n] = rose->dest_digis[n]; | 1107 | srose.srose_digis[n] = rose->dest_digis[n]; |
1110 | } | 1108 | } |
1111 | 1109 | ||
1112 | SOCK_DEBUG(sk, "ROSE: sendto: Addresses built.\n"); | ||
1113 | |||
1114 | /* Build a packet */ | 1110 | /* Build a packet */ |
1115 | SOCK_DEBUG(sk, "ROSE: sendto: building packet.\n"); | ||
1116 | /* Sanity check the packet size */ | 1111 | /* Sanity check the packet size */ |
1117 | if (len > 65535) | 1112 | if (len > 65535) |
1118 | return -EMSGSIZE; | 1113 | return -EMSGSIZE; |
@@ -1127,7 +1122,6 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1127 | /* | 1122 | /* |
1128 | * Put the data on the end | 1123 | * Put the data on the end |
1129 | */ | 1124 | */ |
1130 | SOCK_DEBUG(sk, "ROSE: Appending user data\n"); | ||
1131 | 1125 | ||
1132 | skb_reset_transport_header(skb); | 1126 | skb_reset_transport_header(skb); |
1133 | skb_put(skb, len); | 1127 | skb_put(skb, len); |
@@ -1152,8 +1146,6 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1152 | */ | 1146 | */ |
1153 | asmptr = skb_push(skb, ROSE_MIN_LEN); | 1147 | asmptr = skb_push(skb, ROSE_MIN_LEN); |
1154 | 1148 | ||
1155 | SOCK_DEBUG(sk, "ROSE: Building Network Header.\n"); | ||
1156 | |||
1157 | /* Build a ROSE Network header */ | 1149 | /* Build a ROSE Network header */ |
1158 | asmptr[0] = ((rose->lci >> 8) & 0x0F) | ROSE_GFI; | 1150 | asmptr[0] = ((rose->lci >> 8) & 0x0F) | ROSE_GFI; |
1159 | asmptr[1] = (rose->lci >> 0) & 0xFF; | 1151 | asmptr[1] = (rose->lci >> 0) & 0xFF; |
@@ -1162,10 +1154,6 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1162 | if (qbit) | 1154 | if (qbit) |
1163 | asmptr[0] |= ROSE_Q_BIT; | 1155 | asmptr[0] |= ROSE_Q_BIT; |
1164 | 1156 | ||
1165 | SOCK_DEBUG(sk, "ROSE: Built header.\n"); | ||
1166 | |||
1167 | SOCK_DEBUG(sk, "ROSE: Transmitting buffer\n"); | ||
1168 | |||
1169 | if (sk->sk_state != TCP_ESTABLISHED) { | 1157 | if (sk->sk_state != TCP_ESTABLISHED) { |
1170 | kfree_skb(skb); | 1158 | kfree_skb(skb); |
1171 | return -ENOTCONN; | 1159 | return -ENOTCONN; |