mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
net: remove SOCK_DEBUG leftovers
SOCK_DEBUG comes from the old days. Let's move logging to standard net core ratelimited logging functions Signed-off-by: Denis Kirjanov <dkirjanov@suse.de> changes in v2: - remove SOCK_DEBUG macro altogether Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e3eb47f234
commit
8e5443d2b8
@@ -704,7 +704,7 @@ static int x25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
||||
rc = -EINVAL;
|
||||
}
|
||||
release_sock(sk);
|
||||
SOCK_DEBUG(sk, "x25_bind: socket is bound\n");
|
||||
net_dbg_ratelimited("x25_bind: socket is bound\n");
|
||||
out:
|
||||
return rc;
|
||||
}
|
||||
@@ -1165,10 +1165,10 @@ static int x25_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
|
||||
goto out;
|
||||
}
|
||||
|
||||
SOCK_DEBUG(sk, "x25_sendmsg: sendto: Addresses built.\n");
|
||||
net_dbg_ratelimited("x25_sendmsg: sendto: Addresses built.\n");
|
||||
|
||||
/* Build a packet */
|
||||
SOCK_DEBUG(sk, "x25_sendmsg: sendto: building packet.\n");
|
||||
net_dbg_ratelimited("x25_sendmsg: sendto: building packet.\n");
|
||||
|
||||
if ((msg->msg_flags & MSG_OOB) && len > 32)
|
||||
len = 32;
|
||||
@@ -1187,7 +1187,7 @@ static int x25_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
|
||||
/*
|
||||
* Put the data on the end
|
||||
*/
|
||||
SOCK_DEBUG(sk, "x25_sendmsg: Copying user data\n");
|
||||
net_dbg_ratelimited("x25_sendmsg: Copying user data\n");
|
||||
|
||||
skb_reset_transport_header(skb);
|
||||
skb_put(skb, len);
|
||||
@@ -1211,7 +1211,7 @@ static int x25_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
|
||||
/*
|
||||
* Push down the X.25 header
|
||||
*/
|
||||
SOCK_DEBUG(sk, "x25_sendmsg: Building X.25 Header.\n");
|
||||
net_dbg_ratelimited("x25_sendmsg: Building X.25 Header.\n");
|
||||
|
||||
if (msg->msg_flags & MSG_OOB) {
|
||||
if (x25->neighbour->extended) {
|
||||
@@ -1245,8 +1245,8 @@ static int x25_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
|
||||
skb->data[0] |= X25_Q_BIT;
|
||||
}
|
||||
|
||||
SOCK_DEBUG(sk, "x25_sendmsg: Built header.\n");
|
||||
SOCK_DEBUG(sk, "x25_sendmsg: Transmitting buffer\n");
|
||||
net_dbg_ratelimited("x25_sendmsg: Built header.\n");
|
||||
net_dbg_ratelimited("x25_sendmsg: Transmitting buffer\n");
|
||||
|
||||
rc = -ENOTCONN;
|
||||
if (sk->sk_state != TCP_ESTABLISHED)
|
||||
|
||||
@@ -282,7 +282,7 @@ int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk,
|
||||
* They want reverse charging, we won't accept it.
|
||||
*/
|
||||
if ((theirs.reverse & 0x01 ) && (ours->reverse & 0x01)) {
|
||||
SOCK_DEBUG(sk, "X.25: rejecting reverse charging request\n");
|
||||
net_dbg_ratelimited("X.25: rejecting reverse charging request\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -294,11 +294,11 @@ int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk,
|
||||
int ours_in = ours->throughput & 0x0f;
|
||||
int ours_out = ours->throughput & 0xf0;
|
||||
if (!ours_in || theirs_in < ours_in) {
|
||||
SOCK_DEBUG(sk, "X.25: inbound throughput negotiated\n");
|
||||
net_dbg_ratelimited("X.25: inbound throughput negotiated\n");
|
||||
new->throughput = (new->throughput & 0xf0) | theirs_in;
|
||||
}
|
||||
if (!ours_out || theirs_out < ours_out) {
|
||||
SOCK_DEBUG(sk,
|
||||
net_dbg_ratelimited(
|
||||
"X.25: outbound throughput negotiated\n");
|
||||
new->throughput = (new->throughput & 0x0f) | theirs_out;
|
||||
}
|
||||
@@ -306,22 +306,22 @@ int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk,
|
||||
|
||||
if (theirs.pacsize_in && theirs.pacsize_out) {
|
||||
if (theirs.pacsize_in < ours->pacsize_in) {
|
||||
SOCK_DEBUG(sk, "X.25: packet size inwards negotiated down\n");
|
||||
net_dbg_ratelimited("X.25: packet size inwards negotiated down\n");
|
||||
new->pacsize_in = theirs.pacsize_in;
|
||||
}
|
||||
if (theirs.pacsize_out < ours->pacsize_out) {
|
||||
SOCK_DEBUG(sk, "X.25: packet size outwards negotiated down\n");
|
||||
net_dbg_ratelimited("X.25: packet size outwards negotiated down\n");
|
||||
new->pacsize_out = theirs.pacsize_out;
|
||||
}
|
||||
}
|
||||
|
||||
if (theirs.winsize_in && theirs.winsize_out) {
|
||||
if (theirs.winsize_in < ours->winsize_in) {
|
||||
SOCK_DEBUG(sk, "X.25: window size inwards negotiated down\n");
|
||||
net_dbg_ratelimited("X.25: window size inwards negotiated down\n");
|
||||
new->winsize_in = theirs.winsize_in;
|
||||
}
|
||||
if (theirs.winsize_out < ours->winsize_out) {
|
||||
SOCK_DEBUG(sk, "X.25: window size outwards negotiated down\n");
|
||||
net_dbg_ratelimited("X.25: window size outwards negotiated down\n");
|
||||
new->winsize_out = theirs.winsize_out;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ int x25_output(struct sock *sk, struct sk_buff *skb)
|
||||
kfree_skb(skb);
|
||||
return sent;
|
||||
}
|
||||
SOCK_DEBUG(sk, "x25_output: fragment alloc"
|
||||
net_dbg_ratelimited("x25_output: fragment alloc"
|
||||
" failed, err=%d, %d bytes "
|
||||
"sent\n", err, sent);
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user