[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 7/8] arm/atomic.h: remove '__' prefix for __atomic_add_unless()



Hi Corneliu,

On 14/07/16 10:14, Corneliu ZUZU wrote:
The built-in leading underscores ('__') don't serve any purpose, so rename
__atomic_add_unless() -> atomic_add_unless().

The leading underscores are from the Linux code. We decided to keep those files unmodified to help syncing atomic code.

So I am not in favor of dropping the '__'. If you want to use these functions in the common code, then a wrapper in "asm-arm/atomic.h" should be introduced.

Regards,


Signed-off-by: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx>
---
  xen/include/asm-arm/arm32/atomic.h | 2 +-
  xen/include/asm-arm/arm64/atomic.h | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/include/asm-arm/arm32/atomic.h 
b/xen/include/asm-arm/arm32/atomic.h
index 78de60f..dc95518 100644
--- a/xen/include/asm-arm/arm32/atomic.h
+++ b/xen/include/asm-arm/arm32/atomic.h
@@ -121,7 +121,7 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, 
int new)
        return oldval;
  }

-static inline int __atomic_add_unless(atomic_t *v, int a, int u)
+static inline int atomic_add_unless(atomic_t *v, int a, int u)
  {
        int oldval, newval;
        unsigned long tmp;
diff --git a/xen/include/asm-arm/arm64/atomic.h 
b/xen/include/asm-arm/arm64/atomic.h
index d640bef..f0e83be 100644
--- a/xen/include/asm-arm/arm64/atomic.h
+++ b/xen/include/asm-arm/arm64/atomic.h
@@ -114,7 +114,7 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, 
int new)
        return oldval;
  }

-static inline int __atomic_add_unless(atomic_t *v, int a, int u)
+static inline int atomic_add_unless(atomic_t *v, int a, int u)
  {
        int c, old;



--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.