public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] include/asm-generic/atomic.h: use 'unsigned int' instead of 'unsigned long' for atomic_clear_mask()
@ 2013-10-11  1:41 Chen Gang
  0 siblings, 0 replies; only message in thread
From: Chen Gang @ 2013-10-11  1:41 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linux-Arch, linux-kernel@vger.kernel.org

For atomic_clear_mask(), 'v->counter' is 'int', so it is better to use
'unsigned int' instead of 'unsigned long' for parameter 'mask' to make
atomic_clear_mask() itself consistency.

And atomic_[set/clear]_mask() are pairs, the modification can also let
them consistent with each other.

Although the original implementation can not cause bugs, it is still
better to let it improved.


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 include/asm-generic/atomic.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h
index 33bd2de..f31bff97 100644
--- a/include/asm-generic/atomic.h
+++ b/include/asm-generic/atomic.h
@@ -153,7 +153,7 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
  * Atomically clears the bits set in @mask from @v
  */
 #ifndef atomic_clear_mask
-static inline void atomic_clear_mask(unsigned long mask, atomic_t *v)
+static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
 {
 	unsigned long flags;
 
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-11  1:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11  1:41 [PATCH] include/asm-generic/atomic.h: use 'unsigned int' instead of 'unsigned long' for atomic_clear_mask() Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox