[U-Boot] [RFC PATCH] ubifs: Remove functions which call functions which are not present

Michal Simek michal.simek at xilinx.com
Thu Jan 4 14:37:05 UTC 2018


The patch: "ubifs: Import atomic_long operations from Linux"
(sha1: dc2884315d492b1eefd9d32443c1f0aa3c0a991e)
added copy of atomic-long.h from Linux kernel but when BITS_PER_LONG ==
64 several functions are not present.

The patch is removing these warnings when UBIFS is enabled:
include/asm-generic/atomic-long.h:73:9: warning: implicit declaration of
function ‘atomic64_sub_and_test’ [-Wimplicit-function-declaration]
  return atomic64_sub_and_test(i, v);
         ^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-long.h: In function
‘atomic_long_dec_and_test’:
include/asm-generic/atomic-long.h:80:9: warning: implicit declaration of
function ‘atomic64_dec_and_test’ [-Wimplicit-function-declaration]
  return atomic64_dec_and_test(v);
         ^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-long.h: In function
‘atomic_long_inc_and_test’:
include/asm-generic/atomic-long.h:87:9: warning: implicit declaration of
function ‘atomic64_inc_and_test’ [-Wimplicit-function-declaration]
  return atomic64_inc_and_test(v);
         ^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-long.h: In function
‘atomic_long_add_negative’:
include/asm-generic/atomic-long.h:94:9: warning: implicit declaration of
function ‘atomic64_add_negative’ [-Wimplicit-function-declaration]
  return atomic64_add_negative(i, v);
         ^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-long.h: In function ‘atomic_long_add_return’:
include/asm-generic/atomic-long.h:101:15: warning: implicit declaration
of function ‘atomic64_add_return’ [-Wimplicit-function-declaration]
  return (long)atomic64_add_return(i, v);
               ^~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-long.h: In function ‘atomic_long_sub_return’:
include/asm-generic/atomic-long.h:108:15: warning: implicit declaration
of function ‘atomic64_sub_return’ [-Wimplicit-function-declaration]
  return (long)atomic64_sub_return(i, v);
               ^~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-long.h: In function ‘atomic_long_inc_return’:
include/asm-generic/atomic-long.h:115:15: warning: implicit declaration
of function ‘atomic64_inc_return’ [-Wimplicit-function-declaration]
  return (long)atomic64_inc_return(v);
               ^~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-long.h: In function ‘atomic_long_dec_return’:
include/asm-generic/atomic-long.h:122:15: warning: implicit declaration
of function ‘atomic64_dec_return’ [-Wimplicit-function-declaration]
  return (long)atomic64_dec_return(v);
               ^~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-long.h: In function ‘atomic_long_add_unless’:
include/asm-generic/atomic-long.h:129:15: warning: implicit declaration
of function ‘atomic64_add_unless’ [-Wimplicit-function-declaration]
  return (long)atomic64_add_unless(v, a, u);

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 include/asm-generic/atomic-long.h | 63 ---------------------------------------
 1 file changed, 63 deletions(-)

diff --git a/include/asm-generic/atomic-long.h b/include/asm-generic/atomic-long.h
index d0469ef2e336..d2b86e2684ca 100644
--- a/include/asm-generic/atomic-long.h
+++ b/include/asm-generic/atomic-long.h
@@ -66,69 +66,6 @@ static inline void atomic_long_sub(long i, atomic_long_t *l)
 	atomic64_sub(i, v);
 }
 
-static inline int atomic_long_sub_and_test(long i, atomic_long_t *l)
-{
-	atomic64_t *v = (atomic64_t *)l;
-
-	return atomic64_sub_and_test(i, v);
-}
-
-static inline int atomic_long_dec_and_test(atomic_long_t *l)
-{
-	atomic64_t *v = (atomic64_t *)l;
-
-	return atomic64_dec_and_test(v);
-}
-
-static inline int atomic_long_inc_and_test(atomic_long_t *l)
-{
-	atomic64_t *v = (atomic64_t *)l;
-
-	return atomic64_inc_and_test(v);
-}
-
-static inline int atomic_long_add_negative(long i, atomic_long_t *l)
-{
-	atomic64_t *v = (atomic64_t *)l;
-
-	return atomic64_add_negative(i, v);
-}
-
-static inline long atomic_long_add_return(long i, atomic_long_t *l)
-{
-	atomic64_t *v = (atomic64_t *)l;
-
-	return (long)atomic64_add_return(i, v);
-}
-
-static inline long atomic_long_sub_return(long i, atomic_long_t *l)
-{
-	atomic64_t *v = (atomic64_t *)l;
-
-	return (long)atomic64_sub_return(i, v);
-}
-
-static inline long atomic_long_inc_return(atomic_long_t *l)
-{
-	atomic64_t *v = (atomic64_t *)l;
-
-	return (long)atomic64_inc_return(v);
-}
-
-static inline long atomic_long_dec_return(atomic_long_t *l)
-{
-	atomic64_t *v = (atomic64_t *)l;
-
-	return (long)atomic64_dec_return(v);
-}
-
-static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
-{
-	atomic64_t *v = (atomic64_t *)l;
-
-	return (long)atomic64_add_unless(v, a, u);
-}
-
 #define atomic_long_inc_not_zero(l) atomic64_inc_not_zero((atomic64_t *)(l))
 
 #define atomic_long_cmpxchg(l, old, new) \
-- 
1.9.1



More information about the U-Boot mailing list