Skip to contentSkip to conversation

net/mlx5: Fix atomic_mode enum values

PATCH Applied Leon Romanovsky 2 participants 2 messages Sep 3, 2018 – Sep 4, 2018

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

PATCH 1/1 net/mlx5: Fix atomic_mode enum values

From: Moni Shoua <[email protected]>

The field atomic_mode is 4 bits wide and therefore can hold values from 0x0 to 0xf. Remove the unnecessary 20 bit shift that made the values be incorrect. While that, remove unused enum values.

Fixes 57cda166bbe0 ("net/mlx5: Add DCT command interface")
---
 include/linux/mlx5/driver.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
include/linux/mlx5/driver.h +1 -4
index 66c1170500cf..89caed98ef0b 100644
@@ -163,10 +163,7 @@ enum mlx5_dcbx_oper_mode {
 };
 
 enum mlx5_dct_atomic_mode {
-	MLX5_ATOMIC_MODE_DCT_OFF        = 20,
-	MLX5_ATOMIC_MODE_DCT_NONE       = 0 << MLX5_ATOMIC_MODE_DCT_OFF,
-	MLX5_ATOMIC_MODE_DCT_IB_COMP    = 1 << MLX5_ATOMIC_MODE_DCT_OFF,
-	MLX5_ATOMIC_MODE_DCT_CX         = 2 << MLX5_ATOMIC_MODE_DCT_OFF,
+	MLX5_ATOMIC_MODE_DCT_CX         = 2,
 };
 
 enum {
Signature · 1 line
2.14.4
#1 lore raw
Quoted 6 lines · Leon Romanovsky

From: Moni Shoua <[email protected]>

The field atomic_mode is 4 bits wide and therefore can hold values from 0x0 to 0xf. Remove the unnecessary 20 bit shift that made the values be incorrect. While that, remove unused enum values.

Quoted 8 lines
Fixes 57cda166bbe0 ("net/mlx5: Add DCT command interface")
---
 include/linux/mlx5/driver.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Applied to mlx5-next: aa7e80b220f3 net/mlx5: Fix atomic_mode enum values

Thanks