net/mlx5: Unify and improve command interface
[linux-2.6-block.git] / drivers / net / ethernet / mellanox / mlx5 / core / eq.c
index 71411976ef1c94d4fda4782bd4c99efd5f372c70..aaca09002ca678c9794cb01ba2443f51578ecc29 100644 (file)
@@ -88,14 +88,10 @@ static int mlx5_cmd_destroy_eq(struct mlx5_core_dev *dev, u8 eqn)
 {
        u32 out[MLX5_ST_SZ_DW(destroy_eq_out)] = {0};
        u32 in[MLX5_ST_SZ_DW(destroy_eq_in)]   = {0};
-       int err;
 
        MLX5_SET(destroy_eq_in, in, opcode, MLX5_CMD_OP_DESTROY_EQ);
        MLX5_SET(destroy_eq_in, in, eq_number, eqn);
-
-       err = mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
-       return err ? : mlx5_cmd_status_to_err_v2(out);
-
+       return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
 }
 
 static struct mlx5_eqe *get_eqe(struct mlx5_eq *eq, u32 entry)
@@ -383,7 +379,6 @@ int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx,
                 eq->buf.page_shift - MLX5_ADAPTER_PAGE_SHIFT);
 
        err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
-       err = err ? : mlx5_cmd_status_to_err_v2(out);
        if (err)
                goto err_in;
 
@@ -547,12 +542,9 @@ int mlx5_core_eq_query(struct mlx5_core_dev *dev, struct mlx5_eq *eq,
                       u32 *out, int outlen)
 {
        u32 in[MLX5_ST_SZ_DW(query_eq_in)] = {0};
-       int err;
 
        MLX5_SET(query_eq_in, in, opcode, MLX5_CMD_OP_QUERY_EQ);
        MLX5_SET(query_eq_in, in, eq_number, eq->eqn);
-
-       err = mlx5_cmd_exec(dev, in, sizeof(in), out, outlen);
-       return err ? : mlx5_cmd_status_to_err_v2(out);
+       return mlx5_cmd_exec(dev, in, sizeof(in), out, outlen);
 }
 EXPORT_SYMBOL_GPL(mlx5_core_eq_query);