From: Justin Chen <jchen@hpdst41.cup.hp.com>
To: linux-arch@vger.kernel.org
Cc: bjorn.helgaas@hp.com, dhowells@redhat.com, justin.chen@hp.com,
linux-kernel@vger.kernel.org, yasutake.koichi@jp.panasonic.com
Subject: [PATCH 09/15] bitops: Change the bitmap index from int to unsigned long [mn10300]
Date: Tue, 24 Feb 2009 20:51:00 -0800 (PST) [thread overview]
Message-ID: <200902250451.UAA12851@hpdst41.cup.hp.com> (raw)
Change the index to unsigned long in all bitops for [mn10300]
Signed-off-by: Justin Chen <justin.chen@hp.com>
Reviewed-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
---
arch/mn10300/lib/bitops.c | 4 ++--
include/asm-mn10300/bitops.h | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff -Nru a/arch/mn10300/lib/bitops.c b/arch/mn10300/lib/bitops.c
--- a/arch/mn10300/lib/bitops.c 2009-02-13 15:31:30.000000000 -0800
+++ b/arch/mn10300/lib/bitops.c 2009-02-15 18:19:39.783275397 -0800
@@ -15,7 +15,7 @@
/*
* try flipping a bit using BSET and BCLR
*/
-void change_bit(int nr, volatile void *addr)
+void change_bit(unsigned long nr, volatile void *addr)
{
if (test_bit(nr, addr))
goto try_clear_bit;
@@ -34,7 +34,7 @@
/*
* try flipping a bit using BSET and BCLR and returning the old value
*/
-int test_and_change_bit(int nr, volatile void *addr)
+int test_and_change_bit(unsigned long nr, volatile void *addr)
{
if (test_bit(nr, addr))
goto try_clear_bit;
diff -Nru a/include/asm-mn10300/bitops.h b/include/asm-mn10300/bitops.h
--- a/include/asm-mn10300/bitops.h 2009-02-13 15:31:30.000000000 -0800
+++ b/include/asm-mn10300/bitops.h 2009-02-15 18:19:39.793041022 -0800
@@ -57,7 +57,7 @@
#define clear_bit(nr, addr) ___clear_bit((nr), (addr))
-static inline void __clear_bit(int nr, volatile void *addr)
+static inline void __clear_bit(unsigned long nr, volatile void *addr)
{
unsigned int *a = (unsigned int *) addr;
int mask;
@@ -70,7 +70,7 @@
/*
* test bit
*/
-static inline int test_bit(int nr, const volatile void *addr)
+static inline int test_bit(unsigned long nr, const volatile void *addr)
{
return 1UL & (((const unsigned int *) addr)[nr >> 5] >> (nr & 31));
}
@@ -78,7 +78,7 @@
/*
* change bit
*/
-static inline void __change_bit(int nr, volatile void *addr)
+static inline void __change_bit(unsigned long nr, volatile void *addr)
{
int mask;
unsigned int *a = (unsigned int *) addr;
@@ -88,7 +88,7 @@
*a ^= mask;
}
-extern void change_bit(int nr, volatile void *addr);
+extern void change_bit(unsigned long nr, volatile void *addr);
/*
* test and set bit
@@ -135,7 +135,7 @@
/*
* test and change bit
*/
-static inline int __test_and_change_bit(int nr, volatile void *addr)
+static inline int __test_and_change_bit(unsigned long nr, volatile void *addr)
{
int mask, retval;
unsigned int *a = (unsigned int *)addr;
@@ -148,7 +148,7 @@
return retval;
}
-extern int test_and_change_bit(int nr, volatile void *addr);
+extern int test_and_change_bit(unsigned long nr, volatile void *addr);
#include <asm-generic/bitops/lock.h>
next reply other threads:[~2009-02-25 4:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-25 4:51 Justin Chen [this message]
2009-02-25 12:34 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200902250451.UAA12851@hpdst41.cup.hp.com \
--to=jchen@hpdst41.cup.hp.com \
--cc=bjorn.helgaas@hp.com \
--cc=dhowells@redhat.com \
--cc=justin.chen@hp.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yasutake.koichi@jp.panasonic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome