Skip to contentSkip to conversation

mlx5: Use refcount_t for refcount

PATCH Superseded Chuhong Yuan 1 participant 1 message Aug 2, 2019

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 mlx5: Use refcount_t for refcount

refcount_t is better for reference counters since its implementation can prevent overflows.
So convert atomic_t ref counters to refcount_t.

---
 include/linux/mlx5/driver.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mlx5/driver.h +1 -1
index 0e6da1840c7d..ec8fb382d426 100644
@@ -398,7 +398,7 @@ enum mlx5_res_type {
 
 struct mlx5_core_rsc_common {
 	enum mlx5_res_type	res;
-	atomic_t		refcount;
+	refcount_t		refcount;
 	struct completion	free;
 };
 
Signature · 1 line
2.20.1