From 6907bce0787f7bdffe50fd71bd86d23b13395608 Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Thu, 3 May 2007 10:48:51 -0700 Subject: [PATCH] Trivial whitespace fixes in examples/ Signed-off-by: Roland Dreier --- examples/devinfo.c | 2 +- examples/rc_pingpong.c | 26 +++++++++++++------------- examples/srq_pingpong.c | 26 +++++++++++++------------- examples/uc_pingpong.c | 20 ++++++++++---------- examples/ud_pingpong.c | 20 ++++++++++---------- 5 files changed, 47 insertions(+), 47 deletions(-) diff --git a/examples/devinfo.c b/examples/devinfo.c index 28cf8d1..476e00e 100644 --- a/examples/devinfo.c +++ b/examples/devinfo.c @@ -316,7 +316,7 @@ int main(int argc, char *argv[]) /* parse command line options */ while (1) { - int c; + int c; static struct option long_options[] = { { .name = "ib-dev", .has_arg = 1, .val = 'd' }, { .name = "ib-port", .has_arg = 1, .val = 'i' }, diff --git a/examples/rc_pingpong.c b/examples/rc_pingpong.c index 82623db..4548653 100644 --- a/examples/rc_pingpong.c +++ b/examples/rc_pingpong.c @@ -82,7 +82,7 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn, .qp_state = IBV_QPS_RTR, .path_mtu = mtu, .dest_qp_num = dest->qpn, - .rq_psn = dest->psn, + .rq_psn = dest->psn, .max_dest_rd_atomic = 1, .min_rnr_timer = 12, .ah_attr = { @@ -105,11 +105,11 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn, return 1; } - attr.qp_state = IBV_QPS_RTS; - attr.timeout = 14; - attr.retry_cnt = 7; - attr.rnr_retry = 7; - attr.sq_psn = my_psn; + attr.qp_state = IBV_QPS_RTS; + attr.timeout = 14; + attr.retry_cnt = 7; + attr.rnr_retry = 7; + attr.sq_psn = my_psn; attr.max_rd_atomic = 1; if (ibv_modify_qp(ctx->qp, &attr, IBV_QP_STATE | @@ -421,12 +421,12 @@ int pp_close_ctx(struct pingpong_context *ctx) static int pp_post_recv(struct pingpong_context *ctx, int n) { struct ibv_sge list = { - .addr = (uintptr_t) ctx->buf, + .addr = (uintptr_t) ctx->buf, .length = ctx->size, - .lkey = ctx->mr->lkey + .lkey = ctx->mr->lkey }; struct ibv_recv_wr wr = { - .wr_id = PINGPONG_RECV_WRID, + .wr_id = PINGPONG_RECV_WRID, .sg_list = &list, .num_sge = 1, }; @@ -443,12 +443,12 @@ static int pp_post_recv(struct pingpong_context *ctx, int n) static int pp_post_send(struct pingpong_context *ctx) { struct ibv_sge list = { - .addr = (uintptr_t) ctx->buf, + .addr = (uintptr_t) ctx->buf, .length = ctx->size, - .lkey = ctx->mr->lkey + .lkey = ctx->mr->lkey }; struct ibv_send_wr wr = { - .wr_id = PINGPONG_SEND_WRID, + .wr_id = PINGPONG_SEND_WRID, .sg_list = &list, .num_sge = 1, .opcode = IBV_WR_SEND, @@ -479,7 +479,7 @@ static void usage(const char *argv0) int main(int argc, char *argv[]) { struct ibv_device **dev_list; - struct ibv_device *ib_dev; + struct ibv_device *ib_dev; struct pingpong_context *ctx; struct pingpong_dest my_dest; struct pingpong_dest *rem_dest; diff --git a/examples/srq_pingpong.c b/examples/srq_pingpong.c index 6de3e95..796bd7d 100644 --- a/examples/srq_pingpong.c +++ b/examples/srq_pingpong.c @@ -90,7 +90,7 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, enum ibv_mtu m .qp_state = IBV_QPS_RTR, .path_mtu = mtu, .dest_qp_num = dest[i].qpn, - .rq_psn = dest[i].psn, + .rq_psn = dest[i].psn, .max_dest_rd_atomic = 1, .min_rnr_timer = 12, .ah_attr = { @@ -113,11 +113,11 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, enum ibv_mtu m return 1; } - attr.qp_state = IBV_QPS_RTS; - attr.timeout = 14; - attr.retry_cnt = 7; - attr.rnr_retry = 7; - attr.sq_psn = my_dest[i].psn; + attr.qp_state = IBV_QPS_RTS; + attr.timeout = 14; + attr.retry_cnt = 7; + attr.rnr_retry = 7; + attr.sq_psn = my_dest[i].psn; attr.max_rd_atomic = 1; if (ibv_modify_qp(ctx->qp[i], &attr, IBV_QP_STATE | @@ -480,12 +480,12 @@ int pp_close_ctx(struct pingpong_context *ctx, int num_qp) static int pp_post_recv(struct pingpong_context *ctx, int n) { struct ibv_sge list = { - .addr = (uintptr_t) ctx->buf, + .addr = (uintptr_t) ctx->buf, .length = ctx->size, - .lkey = ctx->mr->lkey + .lkey = ctx->mr->lkey }; struct ibv_recv_wr wr = { - .wr_id = PINGPONG_RECV_WRID, + .wr_id = PINGPONG_RECV_WRID, .sg_list = &list, .num_sge = 1, }; @@ -502,12 +502,12 @@ static int pp_post_recv(struct pingpong_context *ctx, int n) static int pp_post_send(struct pingpong_context *ctx, int qp_index) { struct ibv_sge list = { - .addr = (uintptr_t) ctx->buf, + .addr = (uintptr_t) ctx->buf, .length = ctx->size, - .lkey = ctx->mr->lkey + .lkey = ctx->mr->lkey }; struct ibv_send_wr wr = { - .wr_id = PINGPONG_SEND_WRID, + .wr_id = PINGPONG_SEND_WRID, .sg_list = &list, .num_sge = 1, .opcode = IBV_WR_SEND, @@ -550,7 +550,7 @@ static void usage(const char *argv0) int main(int argc, char *argv[]) { struct ibv_device **dev_list; - struct ibv_device *ib_dev; + struct ibv_device *ib_dev; struct ibv_wc *wc; struct pingpong_context *ctx; struct pingpong_dest my_dest[MAX_QP]; diff --git a/examples/uc_pingpong.c b/examples/uc_pingpong.c index 1b2b1b4..b5886c0 100644 --- a/examples/uc_pingpong.c +++ b/examples/uc_pingpong.c @@ -82,7 +82,7 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn, .qp_state = IBV_QPS_RTR, .path_mtu = mtu, .dest_qp_num = dest->qpn, - .rq_psn = dest->psn, + .rq_psn = dest->psn, .ah_attr = { .is_global = 0, .dlid = dest->lid, @@ -101,8 +101,8 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn, return 1; } - attr.qp_state = IBV_QPS_RTS; - attr.sq_psn = my_psn; + attr.qp_state = IBV_QPS_RTS; + attr.sq_psn = my_psn; if (ibv_modify_qp(ctx->qp, &attr, IBV_QP_STATE | IBV_QP_SQ_PSN)) { @@ -409,12 +409,12 @@ int pp_close_ctx(struct pingpong_context *ctx) static int pp_post_recv(struct pingpong_context *ctx, int n) { struct ibv_sge list = { - .addr = (uintptr_t) ctx->buf, + .addr = (uintptr_t) ctx->buf, .length = ctx->size, - .lkey = ctx->mr->lkey + .lkey = ctx->mr->lkey }; struct ibv_recv_wr wr = { - .wr_id = PINGPONG_RECV_WRID, + .wr_id = PINGPONG_RECV_WRID, .sg_list = &list, .num_sge = 1, }; @@ -431,12 +431,12 @@ static int pp_post_recv(struct pingpong_context *ctx, int n) static int pp_post_send(struct pingpong_context *ctx) { struct ibv_sge list = { - .addr = (uintptr_t) ctx->buf, + .addr = (uintptr_t) ctx->buf, .length = ctx->size, - .lkey = ctx->mr->lkey + .lkey = ctx->mr->lkey }; struct ibv_send_wr wr = { - .wr_id = PINGPONG_SEND_WRID, + .wr_id = PINGPONG_SEND_WRID, .sg_list = &list, .num_sge = 1, .opcode = IBV_WR_SEND, @@ -467,7 +467,7 @@ static void usage(const char *argv0) int main(int argc, char *argv[]) { struct ibv_device **dev_list; - struct ibv_device *ib_dev; + struct ibv_device *ib_dev; struct pingpong_context *ctx; struct pingpong_dest my_dest; struct pingpong_dest *rem_dest; diff --git a/examples/ud_pingpong.c b/examples/ud_pingpong.c index d22ce8b..08ab05c 100644 --- a/examples/ud_pingpong.c +++ b/examples/ud_pingpong.c @@ -88,15 +88,15 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn, .port_num = port }; - attr.qp_state = IBV_QPS_RTR; + attr.qp_state = IBV_QPS_RTR; if (ibv_modify_qp(ctx->qp, &attr, IBV_QP_STATE)) { fprintf(stderr, "Failed to modify QP to RTR\n"); return 1; } - attr.qp_state = IBV_QPS_RTS; - attr.sq_psn = my_psn; + attr.qp_state = IBV_QPS_RTS; + attr.sq_psn = my_psn; if (ibv_modify_qp(ctx->qp, &attr, IBV_QP_STATE | @@ -415,12 +415,12 @@ int pp_close_ctx(struct pingpong_context *ctx) static int pp_post_recv(struct pingpong_context *ctx, int n) { struct ibv_sge list = { - .addr = (uintptr_t) ctx->buf, + .addr = (uintptr_t) ctx->buf, .length = ctx->size + 40, - .lkey = ctx->mr->lkey + .lkey = ctx->mr->lkey }; struct ibv_recv_wr wr = { - .wr_id = PINGPONG_RECV_WRID, + .wr_id = PINGPONG_RECV_WRID, .sg_list = &list, .num_sge = 1, }; @@ -437,12 +437,12 @@ static int pp_post_recv(struct pingpong_context *ctx, int n) static int pp_post_send(struct pingpong_context *ctx, uint32_t qpn) { struct ibv_sge list = { - .addr = (uintptr_t) ctx->buf + 40, + .addr = (uintptr_t) ctx->buf + 40, .length = ctx->size, - .lkey = ctx->mr->lkey + .lkey = ctx->mr->lkey }; struct ibv_send_wr wr = { - .wr_id = PINGPONG_SEND_WRID, + .wr_id = PINGPONG_SEND_WRID, .sg_list = &list, .num_sge = 1, .opcode = IBV_WR_SEND, @@ -479,7 +479,7 @@ static void usage(const char *argv0) int main(int argc, char *argv[]) { struct ibv_device **dev_list; - struct ibv_device *ib_dev; + struct ibv_device *ib_dev; struct pingpong_context *ctx; struct pingpong_dest my_dest; struct pingpong_dest *rem_dest; -- 2.46.0