Merge tag 'for-linus-unmerged' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma...
[muen/linux.git] / drivers / infiniband / hw / mlx5 / qp.c
index 0a0524f..7ed4b70 100644 (file)
@@ -4813,26 +4813,14 @@ static int query_raw_packet_qp_sq_state(struct mlx5_ib_dev *dev,
                                        struct mlx5_ib_sq *sq,
                                        u8 *sq_state)
 {
-       void *out;
-       void *sqc;
-       int inlen;
        int err;
 
-       inlen = MLX5_ST_SZ_BYTES(query_sq_out);
-       out = kvzalloc(inlen, GFP_KERNEL);
-       if (!out)
-               return -ENOMEM;
-
-       err = mlx5_core_query_sq(dev->mdev, sq->base.mqp.qpn, out);
+       err = mlx5_core_query_sq_state(dev->mdev, sq->base.mqp.qpn, sq_state);
        if (err)
                goto out;
-
-       sqc = MLX5_ADDR_OF(query_sq_out, out, sq_context);
-       *sq_state = MLX5_GET(sqc, sqc, state);
        sq->state = *sq_state;
 
 out:
-       kvfree(out);
        return err;
 }