mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 23:14:31 +08:00
IB/usnic: Fix endianness-related warnings
Fix sparse endianness related warnings. Signed-off-by: Upinder Malhi <umalhi@cisco.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
3108bccb3d
commit
4942c0b4b6
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user