Commit a917374e authored by Don Hiatt's avatar Don Hiatt Committed by Doug Ledford

IB/core: Use __be32 for LIDs in opa_is_extended_lid

The LIDs passed to opa_extended_lid are in __be32 format,
change function signature accordingly.

This fixes the following sparse warnings:
  drivers/infiniband/core/cm.c:1181:60: warning: incorrect type in
	argument 1 (different ba
  drivers/infiniband/core/cm.c:1182:60: warning: incorrect type in
	argument 2 (different ba
  drivers/infiniband/core/cm.c:1242:68: warning: incorrect type in
	argument 1 (different ba
  drivers/infiniband/core/cm.c:1243:68: warning: incorrect type in
	argument 2 (different ba
  drivers/infiniband/core/cm.c:2922:66: warning: incorrect type in
	argument 1 (different ba
  drivers/infiniband/core/cm.c:2923:66: warning: incorrect type in
	argument 2 (different ba
  include/rdma/opa_addr.h:102:14: warning: cast to restricted __be32

Fixes: e92aa00a ("IB/CM: Add OPA Path record support to CM")
Reviewed-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: default avatarDon Hiatt <don.hiatt@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 9be6a5d7
...@@ -97,14 +97,14 @@ static inline u32 opa_get_lid_from_gid(const union ib_gid *gid) ...@@ -97,14 +97,14 @@ static inline u32 opa_get_lid_from_gid(const union ib_gid *gid)
* @dlid: The DLID * @dlid: The DLID
* @slid: The SLID * @slid: The SLID
*/ */
static inline bool opa_is_extended_lid(u32 dlid, u32 slid) static inline bool opa_is_extended_lid(__be32 dlid, __be32 slid)
{ {
if ((be32_to_cpu(dlid) >= if ((be32_to_cpu(dlid) >=
be16_to_cpu(IB_MULTICAST_LID_BASE)) || be16_to_cpu(IB_MULTICAST_LID_BASE)) ||
(be32_to_cpu(slid) >= (be32_to_cpu(slid) >=
be16_to_cpu(IB_MULTICAST_LID_BASE))) be16_to_cpu(IB_MULTICAST_LID_BASE)))
return true; return true;
else
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment