aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 82a9b6286dd3..c14d3fd8f328 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -284,8 +284,7 @@ static void xs_format_ipv4_peer_addresses(struct rpc_xprt *xprt,
284 284
285 buf = kzalloc(20, GFP_KERNEL); 285 buf = kzalloc(20, GFP_KERNEL);
286 if (buf) { 286 if (buf) {
287 snprintf(buf, 20, NIPQUAD_FMT, 287 snprintf(buf, 20, "pI4", &addr->sin_addr.s_addr);
288 NIPQUAD(addr->sin_addr.s_addr));
289 } 288 }
290 xprt->address_strings[RPC_DISPLAY_ADDR] = buf; 289 xprt->address_strings[RPC_DISPLAY_ADDR] = buf;
291 290
@@ -300,8 +299,8 @@ static void xs_format_ipv4_peer_addresses(struct rpc_xprt *xprt,
300 299
301 buf = kzalloc(48, GFP_KERNEL); 300 buf = kzalloc(48, GFP_KERNEL);
302 if (buf) { 301 if (buf) {
303 snprintf(buf, 48, "addr="NIPQUAD_FMT" port=%u proto=%s", 302 snprintf(buf, 48, "addr=%pI4 port=%u proto=%s",
304 NIPQUAD(addr->sin_addr.s_addr), 303 &addr->sin_addr.s_addr,
305 ntohs(addr->sin_port), 304 ntohs(addr->sin_port),
306 protocol); 305 protocol);
307 } 306 }
@@ -323,8 +322,8 @@ static void xs_format_ipv4_peer_addresses(struct rpc_xprt *xprt,
323 322
324 buf = kzalloc(30, GFP_KERNEL); 323 buf = kzalloc(30, GFP_KERNEL);
325 if (buf) { 324 if (buf) {
326 snprintf(buf, 30, NIPQUAD_FMT".%u.%u", 325 snprintf(buf, 30, "%pI4.%u.%u",
327 NIPQUAD(addr->sin_addr.s_addr), 326 &addr->sin_addr.s_addr,
328 ntohs(addr->sin_port) >> 8, 327 ntohs(addr->sin_port) >> 8,
329 ntohs(addr->sin_port) & 0xff); 328 ntohs(addr->sin_port) & 0xff);
330 } 329 }
@@ -1413,8 +1412,8 @@ static int xs_bind4(struct sock_xprt *transport, struct socket *sock)
1413 if (port > last) 1412 if (port > last)
1414 nloop++; 1413 nloop++;
1415 } while (err == -EADDRINUSE && nloop != 2); 1414 } while (err == -EADDRINUSE && nloop != 2);
1416 dprintk("RPC: %s "NIPQUAD_FMT":%u: %s (%d)\n", 1415 dprintk("RPC: %s %pI4:%u: %s (%d)\n",
1417 __func__, NIPQUAD(myaddr.sin_addr), 1416 __func__, &myaddr.sin_addr,
1418 port, err ? "failed" : "ok", err); 1417 port, err ? "failed" : "ok", err);
1419 return err; 1418 return err;
1420} 1419}