include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / sunrpc / xprtrdma / transport.c
index 7018eef1dcdd970c381195c54928196100039416..187257b1d88070d5adba6f03074c56b044cd0f37 100644 (file)
@@ -49,6 +49,7 @@
 
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/slab.h>
 #include <linux/seq_file.h>
 
 #include "xprt_rdma.h"
@@ -160,16 +161,15 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
        (void)rpc_ntop(sap, buf, sizeof(buf));
        xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL);
 
-       (void)snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap));
+       snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap));
        xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL);
 
        xprt->address_strings[RPC_DISPLAY_PROTO] = "rdma";
 
-       (void)snprintf(buf, sizeof(buf), "%02x%02x%02x%02x",
-                               NIPQUAD(sin->sin_addr.s_addr));
+       snprintf(buf, sizeof(buf), "%08x", ntohl(sin->sin_addr.s_addr));
        xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL);
 
-       (void)snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
+       snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap));
        xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL);
 
        /* netid */