提交 4942c0b4 编写于 作者: U Upinder Malhi 提交者: Roland Dreier

IB/usnic: Fix endianness-related warnings

Fix sparse endianness related warnings.
Signed-off-by: NUpinder Malhi <umalhi@cisco.com>
Signed-off-by: NRoland Dreier <roland@purestorage.com>
上级 3108bccb
......@@ -36,7 +36,7 @@ usnic_mac_to_gid(const char *const mac, char *raw_gid)
}
static inline void
usnic_mac_ip_to_gid(const char *const mac, const uint32_t inaddr, char *raw_gid)
usnic_mac_ip_to_gid(const char *const mac, const __be32 inaddr, char *raw_gid)
{
raw_gid[0] = 0xfe;
raw_gid[1] = 0x80;
......
......@@ -59,8 +59,7 @@ int usnic_transport_sock_to_str(char *buf, int buf_sz,
if (err)
return 0;
addr = htonl(addr);
return scnprintf(buf, buf_sz, "Proto:%u Addr:%pI4 Port:%hu",
return scnprintf(buf, buf_sz, "Proto:%u Addr:%pI4h Port:%hu",
proto, &addr, port);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册