diff options
author | Sean Hefty <sean.hefty@intel.com> | 2005-08-14 00:05:57 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-08-26 23:37:35 -0400 |
commit | 97f52eb438be7caebe026421545619d8a0c1398a (patch) | |
tree | 1085acb833b691e9cc7ef607e4b4ac8cbd81e03f /drivers/infiniband/hw/mthca/mthca_provider.c | |
parent | 92a6b34bf4d0d11c54b2a6bdd6240f98cb326200 (diff) |
[PATCH] IB: sparse endianness cleanup
Fix sparse warnings. Use __be* where appropriate.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_provider.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_provider.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index 34e6b8685ba3..e2db5e001869 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c | |||
@@ -81,10 +81,10 @@ static int mthca_query_device(struct ib_device *ibdev, | |||
81 | } | 81 | } |
82 | 82 | ||
83 | props->device_cap_flags = mdev->device_cap_flags; | 83 | props->device_cap_flags = mdev->device_cap_flags; |
84 | props->vendor_id = be32_to_cpup((u32 *) (out_mad->data + 36)) & | 84 | props->vendor_id = be32_to_cpup((__be32 *) (out_mad->data + 36)) & |
85 | 0xffffff; | 85 | 0xffffff; |
86 | props->vendor_part_id = be16_to_cpup((u16 *) (out_mad->data + 30)); | 86 | props->vendor_part_id = be16_to_cpup((__be16 *) (out_mad->data + 30)); |
87 | props->hw_ver = be16_to_cpup((u16 *) (out_mad->data + 32)); | 87 | props->hw_ver = be16_to_cpup((__be16 *) (out_mad->data + 32)); |
88 | memcpy(&props->sys_image_guid, out_mad->data + 4, 8); | 88 | memcpy(&props->sys_image_guid, out_mad->data + 4, 8); |
89 | memcpy(&props->node_guid, out_mad->data + 12, 8); | 89 | memcpy(&props->node_guid, out_mad->data + 12, 8); |
90 | 90 | ||
@@ -138,16 +138,16 @@ static int mthca_query_port(struct ib_device *ibdev, | |||
138 | goto out; | 138 | goto out; |
139 | } | 139 | } |
140 | 140 | ||
141 | props->lid = be16_to_cpup((u16 *) (out_mad->data + 16)); | 141 | props->lid = be16_to_cpup((__be16 *) (out_mad->data + 16)); |
142 | props->lmc = out_mad->data[34] & 0x7; | 142 | props->lmc = out_mad->data[34] & 0x7; |
143 | props->sm_lid = be16_to_cpup((u16 *) (out_mad->data + 18)); | 143 | props->sm_lid = be16_to_cpup((__be16 *) (out_mad->data + 18)); |
144 | props->sm_sl = out_mad->data[36] & 0xf; | 144 | props->sm_sl = out_mad->data[36] & 0xf; |
145 | props->state = out_mad->data[32] & 0xf; | 145 | props->state = out_mad->data[32] & 0xf; |
146 | props->phys_state = out_mad->data[33] >> 4; | 146 | props->phys_state = out_mad->data[33] >> 4; |
147 | props->port_cap_flags = be32_to_cpup((u32 *) (out_mad->data + 20)); | 147 | props->port_cap_flags = be32_to_cpup((__be32 *) (out_mad->data + 20)); |
148 | props->gid_tbl_len = to_mdev(ibdev)->limits.gid_table_len; | 148 | props->gid_tbl_len = to_mdev(ibdev)->limits.gid_table_len; |
149 | props->pkey_tbl_len = to_mdev(ibdev)->limits.pkey_table_len; | 149 | props->pkey_tbl_len = to_mdev(ibdev)->limits.pkey_table_len; |
150 | props->qkey_viol_cntr = be16_to_cpup((u16 *) (out_mad->data + 48)); | 150 | props->qkey_viol_cntr = be16_to_cpup((__be16 *) (out_mad->data + 48)); |
151 | props->active_width = out_mad->data[31] & 0xf; | 151 | props->active_width = out_mad->data[31] & 0xf; |
152 | props->active_speed = out_mad->data[35] >> 4; | 152 | props->active_speed = out_mad->data[35] >> 4; |
153 | 153 | ||
@@ -223,7 +223,7 @@ static int mthca_query_pkey(struct ib_device *ibdev, | |||
223 | goto out; | 223 | goto out; |
224 | } | 224 | } |
225 | 225 | ||
226 | *pkey = be16_to_cpu(((u16 *) out_mad->data)[index % 32]); | 226 | *pkey = be16_to_cpu(((__be16 *) out_mad->data)[index % 32]); |
227 | 227 | ||
228 | out: | 228 | out: |
229 | kfree(in_mad); | 229 | kfree(in_mad); |