Skip to contentSkip to conversation

RDMA/mlx5: Merge two enums into a single one

PATCH In review Souptick Joarder 2 participants 2 messages Aug 24, 2019 – Aug 27, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/mlx5: Merge two enums into a single one

These two enums can be merged into a single one wihtout effecting their caller if those were created without intension.

---
 include/uapi/rdma/mlx5-abi.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
include/uapi/rdma/mlx5-abi.h +1 -4
index 624f5b53..c89363a 100644
@@ -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 {
Signature · 1 line
1.9.1
#1 lore raw
Quoted 13 lines · Souptick Joarder

These two enums can be merged into a single one wihtout effecting their caller if those were created without intension.

 include/uapi/rdma/mlx5-abi.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
include/uapi/rdma/mlx5-abi.h +1 -0
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,
 };

include/uapi/rdma/mlx5-abi.h enum mlx5_ib_mmap_cmd { · line 468

Quoted 10 lines
include/uapi/rdma/mlx5-abi.h +1 -4
 
-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