From 08cf500b9a7fdfb8e489e62c28a9fbcd29fc990b Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Sun, 16 Feb 2025 21:43:51 -0800 Subject: [PATCH] tools: remove atomic_set_release() usage in tools/ Userspace versions of both atomic_set_release() and atomic_set() get translated into uatomic_set(). To avoid extra definitions of atomic_set_release(), replace its usage inside refcount_set_release() with atomic_set(). This results in no functional changes. Link: https://lkml.kernel.org/r/20250217054351.2973666-1-surenb@google.com Fixes: 1465347e498f ("mm: make vma cache SLAB_TYPESAFE_BY_RCU") Signed-off-by: Suren Baghdasaryan Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202502170049.sHfzQwpv-lkp@intel.com/ Cc: Christian Brauner Cc: David Hildenbrand Cc: David Howells Cc: Davidlohr Bueso Cc: Heiko Carstens Cc: Hugh Dickins Cc: Jann Horn Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Klara Modin Cc: Liam R. Howlett Cc: Lokesh Gidra Cc: Lorenzo Stoakes Cc: Mateusz Guzik Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Minchan Kim Cc: Oleg Nesterov Cc: Pasha Tatashin Cc: "Paul E . McKenney" Cc: Peter Xu Cc: Peter Zijlstra (Intel) Cc: Shakeel Butt Cc: Shivank Garg Cc: Sourav Panda Cc: Stephen Rothwell Cc: Vlastimil Babka Cc: Wei Yang Cc: Will Deacon Signed-off-by: Andrew Morton --- tools/include/linux/refcount.h | 2 +- tools/testing/vma/linux/atomic.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/include/linux/refcount.h b/tools/include/linux/refcount.h index 1ace03e1a4f8b..1f30956e070d3 100644 --- a/tools/include/linux/refcount.h +++ b/tools/include/linux/refcount.h @@ -62,7 +62,7 @@ static inline void refcount_set(refcount_t *r, unsigned int n) static inline void refcount_set_release(refcount_t *r, unsigned int n) { - atomic_set_release(&r->refs, n); + atomic_set(&r->refs, n); } static inline unsigned int refcount_read(const refcount_t *r) diff --git a/tools/testing/vma/linux/atomic.h b/tools/testing/vma/linux/atomic.h index 683383d0f2bf8..788c597c4fdea 100644 --- a/tools/testing/vma/linux/atomic.h +++ b/tools/testing/vma/linux/atomic.h @@ -7,7 +7,6 @@ #define atomic_inc(x) uatomic_inc(x) #define atomic_read(x) uatomic_read(x) #define atomic_set(x, y) uatomic_set(x, y) -#define atomic_set_release(x, y) uatomic_set(x, y) #define U8_MAX UCHAR_MAX #ifndef atomic_cmpxchg_relaxed -- 2.50.1