Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755763Ab3JKBmi (ORCPT ); Thu, 10 Oct 2013 21:42:38 -0400 Received: from intranet.asianux.com ([58.214.24.6]:48732 "EHLO intranet.asianux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752034Ab3JKBmg (ORCPT ); Thu, 10 Oct 2013 21:42:36 -0400 X-Spam-Score: -100.8 Message-ID: <5257574D.1040604@asianux.com> Date: Fri, 11 Oct 2013 09:41:33 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Arnd Bergmann CC: Linux-Arch , "linux-kernel@vger.kernel.org" Subject: [PATCH] include/asm-generic/atomic.h: use 'unsigned int' instead of 'unsigned long' for atomic_clear_mask() Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1299 Lines: 36 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/