Skip to content

Commit 6884b34

Browse files
JoePerchesdavem330
authored andcommitted
net/rds: remove uses of NIPQUAD, use %pI4
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]>
1 parent 650b2ef commit 6884b34

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

net/rds/tcp_connect.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ int rds_tcp_conn_connect(struct rds_connection *conn)
9090

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

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

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

net/rds/tcp_listen.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ static int rds_tcp_accept_one(struct socket *sock)
6666

6767
inet = inet_sk(new_sock->sk);
6868

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

7373
conn = rds_conn_create(inet->inet_saddr, inet->inet_daddr,
7474
&rds_tcp_transport, GFP_KERNEL);

net/rds/tcp_send.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ int rds_tcp_xmit(struct rds_connection *conn, struct rds_message *rm,
193193
rds_tcp_stats_inc(s_tcp_sndbuf_full);
194194
ret = 0;
195195
} else {
196-
printk(KERN_WARNING "RDS/tcp: send to %u.%u.%u.%u "
196+
printk(KERN_WARNING "RDS/tcp: send to %pI4 "
197197
"returned %d, disconnecting and reconnecting\n",
198-
NIPQUAD(conn->c_faddr), ret);
198+
&conn->c_faddr, ret);
199199
rds_conn_drop(conn);
200200
}
201201
}

0 commit comments

Comments
 (0)