summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorUpinder Malhi <umalhi@cisco.com>2014-01-16 02:02:20 +0100
committerRoland Dreier <roland@purestorage.com>2014-01-18 22:48:54 +0100
commit4942c0b4b64478ff45c3bbf4d40aebd66de0bcc5 (patch)
tree6980df69ff7e4a85bd77aaafc8b0a42fc7d40496 /drivers/infiniband
parentIB/usnic: Append documentation to usnic_transport.h and cleanup (diff)
downloadlinux-4942c0b4b64478ff45c3bbf4d40aebd66de0bcc5.tar.xz
linux-4942c0b4b64478ff45c3bbf4d40aebd66de0bcc5.zip
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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/usnic/usnic_common_util.h2
-rw-r--r--drivers/infiniband/hw/usnic/usnic_transport.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/usnic/usnic_common_util.h b/drivers/infiniband/hw/usnic/usnic_common_util.h
index afd8bfa379ed..9d737ed5e55d 100644
--- a/drivers/infiniband/hw/usnic/usnic_common_util.h
+++ b/drivers/infiniband/hw/usnic/usnic_common_util.h
@@ -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;
diff --git a/drivers/infiniband/hw/usnic/usnic_transport.c b/drivers/infiniband/hw/usnic/usnic_transport.c
index 9182cc8f8b93..ddef6f77a78c 100644
--- a/drivers/infiniband/hw/usnic/usnic_transport.c
+++ b/drivers/infiniband/hw/usnic/usnic_transport.c
@@ -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);
}