lkml.org 
[lkml]   [2010]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[33/59] sparc64: Fix atomic64_t routine return values.
    2.6.32-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: David S. Miller <davem@davemloft.net>

    [ Upstream commits 86fa04b8742ac681d470786f55e2403ada0075b2
    and b10f997bb0f4e5b34d447f498fb85834a40d3acb ]

    Should return 'long' instead of 'int'.

    Thanks to Dimitris Michailidis and Tony Luck.

    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    ---
    arch/sparc/include/asm/atomic_64.h | 10 +++++-----
    1 file changed, 5 insertions(+), 5 deletions(-)

    --- a/arch/sparc/include/asm/atomic_64.h
    +++ b/arch/sparc/include/asm/atomic_64.h
    @@ -20,14 +20,14 @@
    #define atomic64_set(v, i) (((v)->counter) = i)

    extern void atomic_add(int, atomic_t *);
    -extern void atomic64_add(int, atomic64_t *);
    +extern void atomic64_add(long, atomic64_t *);
    extern void atomic_sub(int, atomic_t *);
    -extern void atomic64_sub(int, atomic64_t *);
    +extern void atomic64_sub(long, atomic64_t *);

    extern int atomic_add_ret(int, atomic_t *);
    -extern int atomic64_add_ret(int, atomic64_t *);
    +extern long atomic64_add_ret(long, atomic64_t *);
    extern int atomic_sub_ret(int, atomic_t *);
    -extern int atomic64_sub_ret(int, atomic64_t *);
    +extern long atomic64_sub_ret(long, atomic64_t *);

    #define atomic_dec_return(v) atomic_sub_ret(1, v)
    #define atomic64_dec_return(v) atomic64_sub_ret(1, v)
    @@ -91,7 +91,7 @@ static inline int atomic_add_unless(atom
    ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
    #define atomic64_xchg(v, new) (xchg(&((v)->counter), new))

    -static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
    +static inline long atomic64_add_unless(atomic64_t *v, long a, long u)
    {
    long c, old;
    c = atomic64_read(v);



    \
     
     \ /
      Last update: 2010-08-25 01:47    [W:0.022 / U:29.876 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site