[PATCH rdma-core 01/10] verbs: Fix wrong command structure usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>

Several places were using the wrong command buffer type for the command
being executed. It turns out none of these are bugs since both structs
have identical members and layouts, but it causes the type checking in later
patches to get angry.

Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
---
 libibverbs/cmd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index d88b3aa816eac4..af6ea5cfe12a0f 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -1425,7 +1425,7 @@ int ibv_cmd_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
 		      struct ibv_recv_wr **bad_wr)
 {
 	struct ibv_post_recv     *cmd;
-	struct ib_uverbs_post_send_resp resp;
+	struct ib_uverbs_post_recv_resp resp;
 	struct ibv_recv_wr       *i;
 	struct ib_uverbs_recv_wr  *n, *tmp;
 	struct ibv_sge           *s;
@@ -1486,7 +1486,7 @@ int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
 		      struct ibv_recv_wr **bad_wr)
 {
 	struct ibv_post_srq_recv *cmd;
-	struct ib_uverbs_post_recv_resp resp;
+	struct ib_uverbs_post_srq_recv_resp resp;
 	struct ibv_recv_wr       *i;
 	struct ib_uverbs_recv_wr  *n, *tmp;
 	struct ibv_sge           *s;
@@ -1841,7 +1841,7 @@ int ibv_cmd_create_flow(struct ibv_qp *qp,
 			size_t ucmd_size)
 {
 	struct ibv_create_flow *cmd;
-	struct ib_uverbs_destroy_flow  resp;
+	struct ib_uverbs_create_flow_resp resp;
 	size_t cmd_size;
 	size_t written_size;
 	int i, err;
-- 
2.19.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux