All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] atomic-long: Fix warnings on arm64
@ 2018-01-27  3:11 Bradley Bolen
  2018-01-28 18:53 ` [U-Boot] " Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Bradley Bolen @ 2018-01-27  3:11 UTC (permalink / raw)
  To: u-boot

Several inline functions in this file reference undefined functions in
U-Boot.  For example:

atomic-long.h:73:9: warning: implicit declaration of function
'atomic64_sub_and_test'
atomic-long.h:80:9: warning: implicit declaration of function
'atomic64_dec_and_test'
atomic-long.h:87:9: warning: implicit declaration of function
'atomic64_inc_and_test'

Handle this the same as the 32 bit build by wrapping these functions in
a __UBOOT__ check.

Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>
---
 include/asm-generic/atomic-long.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/asm-generic/atomic-long.h b/include/asm-generic/atomic-long.h
index d0469ef2e3..32f288b706 100644
--- a/include/asm-generic/atomic-long.h
+++ b/include/asm-generic/atomic-long.h
@@ -66,6 +66,7 @@ static inline void atomic_long_sub(long i, atomic_long_t *l)
 	atomic64_sub(i, v);
 }
 
+#ifndef __UBOOT__
 static inline int atomic_long_sub_and_test(long i, atomic_long_t *l)
 {
 	atomic64_t *v = (atomic64_t *)l;
@@ -135,6 +136,7 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
 	(atomic64_cmpxchg((atomic64_t *)(l), (old), (new)))
 #define atomic_long_xchg(v, new) \
 	(atomic64_xchg((atomic64_t *)(v), (new)))
+#endif  /*  __UBOOT__ */
 
 #else  /*  BITS_PER_LONG == 64  */
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] atomic-long: Fix warnings on arm64
  2018-01-27  3:11 [U-Boot] [PATCH] atomic-long: Fix warnings on arm64 Bradley Bolen
@ 2018-01-28 18:53 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2018-01-28 18:53 UTC (permalink / raw)
  To: u-boot

On Fri, Jan 26, 2018 at 10:11:04PM -0500, Bradley Bolen wrote:

> Several inline functions in this file reference undefined functions in
> U-Boot.  For example:
> 
> atomic-long.h:73:9: warning: implicit declaration of function
> 'atomic64_sub_and_test'
> atomic-long.h:80:9: warning: implicit declaration of function
> 'atomic64_dec_and_test'
> atomic-long.h:87:9: warning: implicit declaration of function
> 'atomic64_inc_and_test'
> 
> Handle this the same as the 32 bit build by wrapping these functions in
> a __UBOOT__ check.
> 
> Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>

Applied to u-boot/master, thanks!

[Michal, I think this ends up being easier to maintain long-term than
your RFC patch that removed all of these functions]

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180128/981e38fa/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-28 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-27  3:11 [U-Boot] [PATCH] atomic-long: Fix warnings on arm64 Bradley Bolen
2018-01-28 18:53 ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.