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_dev.h | |
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_dev.h')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_dev.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h index 33162a960c7..3519ca4e086 100644 --- a/drivers/infiniband/hw/mthca/mthca_dev.h +++ b/drivers/infiniband/hw/mthca/mthca_dev.h | |||
@@ -333,14 +333,13 @@ extern void __buggy_use_of_MTHCA_PUT(void); | |||
333 | 333 | ||
334 | #define MTHCA_PUT(dest, source, offset) \ | 334 | #define MTHCA_PUT(dest, source, offset) \ |
335 | do { \ | 335 | do { \ |
336 | __typeof__(source) *__p = \ | 336 | void *__d = ((char *) (dest) + (offset)); \ |
337 | (__typeof__(source) *) ((char *) (dest) + (offset)); \ | ||
338 | switch (sizeof(source)) { \ | 337 | switch (sizeof(source)) { \ |
339 | case 1: *__p = (source); break; \ | 338 | case 1: *(u8 *) __d = (source); break; \ |
340 | case 2: *__p = cpu_to_be16(source); break; \ | 339 | case 2: *(__be16 *) __d = cpu_to_be16(source); break; \ |
341 | case 4: *__p = cpu_to_be32(source); break; \ | 340 | case 4: *(__be32 *) __d = cpu_to_be32(source); break; \ |
342 | case 8: *__p = cpu_to_be64(source); break; \ | 341 | case 8: *(__be64 *) __d = cpu_to_be64(source); break; \ |
343 | default: __buggy_use_of_MTHCA_PUT(); \ | 342 | default: __buggy_use_of_MTHCA_PUT(); \ |
344 | } \ | 343 | } \ |
345 | } while (0) | 344 | } while (0) |
346 | 345 | ||
@@ -435,7 +434,7 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, | |||
435 | int mthca_arbel_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, | 434 | int mthca_arbel_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, |
436 | struct ib_recv_wr **bad_wr); | 435 | struct ib_recv_wr **bad_wr); |
437 | int mthca_free_err_wqe(struct mthca_dev *dev, struct mthca_qp *qp, int is_send, | 436 | int mthca_free_err_wqe(struct mthca_dev *dev, struct mthca_qp *qp, int is_send, |
438 | int index, int *dbd, u32 *new_wqe); | 437 | int index, int *dbd, __be32 *new_wqe); |
439 | int mthca_alloc_qp(struct mthca_dev *dev, | 438 | int mthca_alloc_qp(struct mthca_dev *dev, |
440 | struct mthca_pd *pd, | 439 | struct mthca_pd *pd, |
441 | struct mthca_cq *send_cq, | 440 | struct mthca_cq *send_cq, |