Message ID | 1468487659-12660-1-git-send-email-czuzu@bitdefender.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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@bitdefender.com> > --- > 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; > >
On 7/14/2016 1:00 PM, Julien Grall wrote: > 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, Ok, great. Either add a wrapper or maybe keeping the underscores on X86 too and not including it's prototype in <xen/atomic.h>. What would you prefer? Zuzu C.
On Thu, 14 Jul 2016, Corneliu ZUZU wrote: > On 7/14/2016 1:00 PM, Julien Grall wrote: > > 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, > > Ok, great. Either add a wrapper or maybe keeping the underscores on X86 too > and not including it's prototype in <xen/atomic.h>. What would you prefer? Add a wrapper
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;
The built-in leading underscores ('__') don't serve any purpose, so rename __atomic_add_unless() -> atomic_add_unless(). Signed-off-by: Corneliu ZUZU <czuzu@bitdefender.com> --- xen/include/asm-arm/arm32/atomic.h | 2 +- xen/include/asm-arm/arm64/atomic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)