RDMA/mlx5: Merge two enums into a single one
diff mbox series

Message ID 1566665546-8209-1-git-send-email-jrdr.linux@gmail.com
State New
Headers show
Series
  • RDMA/mlx5: Merge two enums into a single one
Related show

Commit Message

Souptick Joarder Aug. 24, 2019, 4:52 p.m. UTC
These two enums can be merged into a single one wihtout effecting
their caller if those were created without intension.

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
 include/uapi/rdma/mlx5-abi.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Jason Gunthorpe Aug. 27, 2019, 3:52 p.m. UTC | #1
On Sat, Aug 24, 2019 at 10:22:26PM +0530, Souptick Joarder wrote:
> These two enums can be merged into a single one wihtout effecting
> their caller if those were created without intension.
> 
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
>  include/uapi/rdma/mlx5-abi.h | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/include/uapi/rdma/mlx5-abi.h b/include/uapi/rdma/mlx5-abi.h
> index 624f5b53..c89363a 100644
> +++ b/include/uapi/rdma/mlx5-abi.h
> @@ -461,13 +461,10 @@ enum mlx5_ib_mmap_cmd {
>  	MLX5_IB_MMAP_DEVICE_MEM                 = 8,
>  };
>  
> -enum {
> -	MLX5_IB_CLOCK_INFO_KERNEL_UPDATING = 1,
> -};
> -
>  /* Bit indexes for the mlx5_alloc_ucontext_resp.clock_info_versions bitmap */
>  enum {
>  	MLX5_IB_CLOCK_INFO_V1              = 0,
> +	MLX5_IB_CLOCK_INFO_KERNEL_UPDATING = 1,
>  };

The enums are used in different contexts, I don't think this is an
improvement

Jason

Patch
diff mbox series

diff --git a/include/uapi/rdma/mlx5-abi.h b/include/uapi/rdma/mlx5-abi.h
index 624f5b53..c89363a 100644
--- a/include/uapi/rdma/mlx5-abi.h
+++ b/include/uapi/rdma/mlx5-abi.h
@@ -461,13 +461,10 @@  enum mlx5_ib_mmap_cmd {
 	MLX5_IB_MMAP_DEVICE_MEM                 = 8,
 };
 
-enum {
-	MLX5_IB_CLOCK_INFO_KERNEL_UPDATING = 1,
-};
-
 /* Bit indexes for the mlx5_alloc_ucontext_resp.clock_info_versions bitmap */
 enum {
 	MLX5_IB_CLOCK_INFO_V1              = 0,
+	MLX5_IB_CLOCK_INFO_KERNEL_UPDATING = 1,
 };
 
 struct mlx5_ib_flow_counters_desc {