Skip to content

Commit

Permalink
net/rds: remove uses of NIPQUAD, use %pI4
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Perches <[email protected]>
Cc: Andy Grover <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
JoePerches authored and davem330 committed Feb 4, 2010
1 parent 650b2ef commit 6884b34
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
7 changes: 3 additions & 4 deletions net/rds/tcp_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ int rds_tcp_conn_connect(struct rds_connection *conn)

ret = sock->ops->bind(sock, (struct sockaddr *)&src, sizeof(src));
if (ret) {
rdsdebug("bind failed with %d at address %u.%u.%u.%u\n",
ret, NIPQUAD(conn->c_laddr));
rdsdebug("bind failed with %d at address %pI4\n",
ret, &conn->c_laddr);
goto out;
}

Expand All @@ -108,8 +108,7 @@ int rds_tcp_conn_connect(struct rds_connection *conn)
O_NONBLOCK);
sock = NULL;

rdsdebug("connect to address %u.%u.%u.%u returned %d\n",
NIPQUAD(conn->c_faddr), ret);
rdsdebug("connect to address %pI4 returned %d\n", &conn->c_faddr, ret);
if (ret == -EINPROGRESS)
ret = 0;

Expand Down
6 changes: 3 additions & 3 deletions net/rds/tcp_listen.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ static int rds_tcp_accept_one(struct socket *sock)

inet = inet_sk(new_sock->sk);

rdsdebug("accepted tcp %u.%u.%u.%u:%u -> %u.%u.%u.%u:%u\n",
NIPQUAD(inet->inet_saddr), ntohs(inet->inet_sport),
NIPQUAD(inet->inet_daddr), ntohs(inet->inet_dport));
rdsdebug("accepted tcp %pI4:%u -> %pI4:%u\n",
&inet->inet_saddr, ntohs(inet->inet_sport),
&inet->inet_daddr, ntohs(inet->inet_dport));

conn = rds_conn_create(inet->inet_saddr, inet->inet_daddr,
&rds_tcp_transport, GFP_KERNEL);
Expand Down
4 changes: 2 additions & 2 deletions net/rds/tcp_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ int rds_tcp_xmit(struct rds_connection *conn, struct rds_message *rm,
rds_tcp_stats_inc(s_tcp_sndbuf_full);
ret = 0;
} else {
printk(KERN_WARNING "RDS/tcp: send to %u.%u.%u.%u "
printk(KERN_WARNING "RDS/tcp: send to %pI4 "
"returned %d, disconnecting and reconnecting\n",
NIPQUAD(conn->c_faddr), ret);
&conn->c_faddr, ret);
rds_conn_drop(conn);
}
}
Expand Down

0 comments on commit 6884b34

Please sign in to comment.