Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3c1d9303a9676fd4f9062f2347f1a6241eb6314b
Commit:     3c1d9303a9676fd4f9062f2347f1a6241eb6314b
Parent:     b43890af886b14d3052d8b7f9e0b2f8d261dcd7d
Author:     Jesper Nilsson <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 21 17:01:31 2008 +0100
Committer:  Jesper Nilsson <[EMAIL PROTECTED]>
CommitDate: Fri Feb 8 11:06:33 2008 +0100

    CRIS: Fix bugs in return value of atomic_inc_return and atomic_dec_return.
    
    Increment and decrement before assigning to return value.
---
 include/asm-cris/atomic.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-cris/atomic.h b/include/asm-cris/atomic.h
index 2949a94..5fc8776 100644
--- a/include/asm-cris/atomic.h
+++ b/include/asm-cris/atomic.h
@@ -91,7 +91,7 @@ static inline int atomic_inc_return(volatile atomic_t *v)
        unsigned long flags;
        int retval;
        cris_atomic_save(v, flags);
-       retval = (v->counter)++;
+       retval = ++(v->counter);
        cris_atomic_restore(v, flags);
        return retval;
 }
@@ -101,7 +101,7 @@ static inline int atomic_dec_return(volatile atomic_t *v)
        unsigned long flags;
        int retval;
        cris_atomic_save(v, flags);
-       retval = (v->counter)--;
+       retval = --(v->counter);
        cris_atomic_restore(v, flags);
        return retval;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to