diff options
Diffstat (limited to 'net/sunrpc/xprtrdma/transport.c')
-rw-r--r-- | net/sunrpc/xprtrdma/transport.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index 7018eef1dcdd..187257b1d880 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c | |||
@@ -49,6 +49,7 @@ | |||
49 | 49 | ||
50 | #include <linux/module.h> | 50 | #include <linux/module.h> |
51 | #include <linux/init.h> | 51 | #include <linux/init.h> |
52 | #include <linux/slab.h> | ||
52 | #include <linux/seq_file.h> | 53 | #include <linux/seq_file.h> |
53 | 54 | ||
54 | #include "xprt_rdma.h" | 55 | #include "xprt_rdma.h" |
@@ -160,16 +161,15 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt) | |||
160 | (void)rpc_ntop(sap, buf, sizeof(buf)); | 161 | (void)rpc_ntop(sap, buf, sizeof(buf)); |
161 | xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL); | 162 | xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL); |
162 | 163 | ||
163 | (void)snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap)); | 164 | snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap)); |
164 | xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL); | 165 | xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL); |
165 | 166 | ||
166 | xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma"; | 167 | xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma"; |
167 | 168 | ||
168 | (void)snprintf(buf, sizeof(buf), "%02x%02x%02x%02x", | 169 | snprintf(buf, sizeof(buf), "%08x", ntohl(sin->sin_addr.s_addr)); |
169 | NIPQUAD(sin->sin_addr.s_addr)); | ||
170 | xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); | 170 | xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); |
171 | 171 | ||
172 | (void)snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap)); | 172 | snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap)); |
173 | xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL); | 173 | xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL); |
174 | 174 | ||
175 | /* netid */ | 175 | /* netid */ |