aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/bitops_32.h
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2008-01-30 07:30:32 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:32 -0500
commitec12fa5c80126b252ebcb474d12c832ec4647daa (patch)
tree5b113fca84459657eee9f0be5f4978ea27708f80 /include/asm-x86/bitops_32.h
parentc9cce83dd1d59f52e2c8f8c7d265ba4854c40785 (diff)
x86: bitops_32.h style cleanups
Coding style cleanups in x86/bitops_32.h: - drop space in "* addr" - whitespace & indentation fixes - spello fixes Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/bitops_32.h')
-rw-r--r--include/asm-x86/bitops_32.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/include/asm-x86/bitops_32.h b/include/asm-x86/bitops_32.h
index 0b40f6d20be..5a29cce6a91 100644
--- a/include/asm-x86/bitops_32.h
+++ b/include/asm-x86/bitops_32.h
@@ -37,7 +37,7 @@
37 * Note that @nr may be almost arbitrarily large; this function is not 37 * Note that @nr may be almost arbitrarily large; this function is not
38 * restricted to acting on a single-word quantity. 38 * restricted to acting on a single-word quantity.
39 */ 39 */
40static inline void set_bit(int nr, volatile unsigned long * addr) 40static inline void set_bit(int nr, volatile unsigned long *addr)
41{ 41{
42 __asm__ __volatile__( LOCK_PREFIX 42 __asm__ __volatile__( LOCK_PREFIX
43 "btsl %1,%0" 43 "btsl %1,%0"
@@ -54,7 +54,7 @@ static inline void set_bit(int nr, volatile unsigned long * addr)
54 * If it's called on the same region of memory simultaneously, the effect 54 * If it's called on the same region of memory simultaneously, the effect
55 * may be that only one operation succeeds. 55 * may be that only one operation succeeds.
56 */ 56 */
57static inline void __set_bit(int nr, volatile unsigned long * addr) 57static inline void __set_bit(int nr, volatile unsigned long *addr)
58{ 58{
59 __asm__( 59 __asm__(
60 "btsl %1,%0" 60 "btsl %1,%0"
@@ -72,7 +72,7 @@ static inline void __set_bit(int nr, volatile unsigned long * addr)
72 * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() 72 * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
73 * in order to ensure changes are visible on other processors. 73 * in order to ensure changes are visible on other processors.
74 */ 74 */
75static inline void clear_bit(int nr, volatile unsigned long * addr) 75static inline void clear_bit(int nr, volatile unsigned long *addr)
76{ 76{
77 __asm__ __volatile__( LOCK_PREFIX 77 __asm__ __volatile__( LOCK_PREFIX
78 "btrl %1,%0" 78 "btrl %1,%0"
@@ -94,7 +94,7 @@ static inline void clear_bit_unlock(unsigned long nr, volatile unsigned long *ad
94 clear_bit(nr, addr); 94 clear_bit(nr, addr);
95} 95}
96 96
97static inline void __clear_bit(int nr, volatile unsigned long * addr) 97static inline void __clear_bit(int nr, volatile unsigned long *addr)
98{ 98{
99 __asm__ __volatile__( 99 __asm__ __volatile__(
100 "btrl %1,%0" 100 "btrl %1,%0"
@@ -132,7 +132,7 @@ static inline void __clear_bit_unlock(unsigned long nr, volatile unsigned long *
132 * If it's called on the same region of memory simultaneously, the effect 132 * If it's called on the same region of memory simultaneously, the effect
133 * may be that only one operation succeeds. 133 * may be that only one operation succeeds.
134 */ 134 */
135static inline void __change_bit(int nr, volatile unsigned long * addr) 135static inline void __change_bit(int nr, volatile unsigned long *addr)
136{ 136{
137 __asm__ __volatile__( 137 __asm__ __volatile__(
138 "btcl %1,%0" 138 "btcl %1,%0"
@@ -150,7 +150,7 @@ static inline void __change_bit(int nr, volatile unsigned long * addr)
150 * Note that @nr may be almost arbitrarily large; this function is not 150 * Note that @nr may be almost arbitrarily large; this function is not
151 * restricted to acting on a single-word quantity. 151 * restricted to acting on a single-word quantity.
152 */ 152 */
153static inline void change_bit(int nr, volatile unsigned long * addr) 153static inline void change_bit(int nr, volatile unsigned long *addr)
154{ 154{
155 __asm__ __volatile__( LOCK_PREFIX 155 __asm__ __volatile__( LOCK_PREFIX
156 "btcl %1,%0" 156 "btcl %1,%0"
@@ -167,7 +167,7 @@ static inline void change_bit(int nr, volatile unsigned long * addr)
167 * It may be reordered on other architectures than x86. 167 * It may be reordered on other architectures than x86.
168 * It also implies a memory barrier. 168 * It also implies a memory barrier.
169 */ 169 */
170static inline int test_and_set_bit(int nr, volatile unsigned long * addr) 170static inline int test_and_set_bit(int nr, volatile unsigned long *addr)
171{ 171{
172 int oldbit; 172 int oldbit;
173 173
@@ -199,7 +199,7 @@ static inline int test_and_set_bit_lock(int nr, volatile unsigned long *addr)
199 * If two examples of this operation race, one can appear to succeed 199 * If two examples of this operation race, one can appear to succeed
200 * but actually fail. You must protect multiple accesses with a lock. 200 * but actually fail. You must protect multiple accesses with a lock.
201 */ 201 */
202static inline int __test_and_set_bit(int nr, volatile unsigned long * addr) 202static inline int __test_and_set_bit(int nr, volatile unsigned long *addr)
203{ 203{
204 int oldbit; 204 int oldbit;
205 205
@@ -219,7 +219,7 @@ static inline int __test_and_set_bit(int nr, volatile unsigned long * addr)
219 * It can be reorderdered on other architectures other than x86. 219 * It can be reorderdered on other architectures other than x86.
220 * It also implies a memory barrier. 220 * It also implies a memory barrier.
221 */ 221 */
222static inline int test_and_clear_bit(int nr, volatile unsigned long * addr) 222static inline int test_and_clear_bit(int nr, volatile unsigned long *addr)
223{ 223{
224 int oldbit; 224 int oldbit;
225 225
@@ -270,7 +270,7 @@ static inline int __test_and_change_bit(int nr, volatile unsigned long *addr)
270 * This operation is atomic and cannot be reordered. 270 * This operation is atomic and cannot be reordered.
271 * It also implies a memory barrier. 271 * It also implies a memory barrier.
272 */ 272 */
273static inline int test_and_change_bit(int nr, volatile unsigned long* addr) 273static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
274{ 274{
275 int oldbit; 275 int oldbit;
276 276
@@ -287,7 +287,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long* addr)
287 * @nr: bit number to test 287 * @nr: bit number to test
288 * @addr: Address to start counting from 288 * @addr: Address to start counting from
289 */ 289 */
290static int test_bit(int nr, const volatile void * addr); 290static int test_bit(int nr, const volatile void *addr);
291#endif 291#endif
292 292
293static __always_inline int constant_test_bit(int nr, const volatile unsigned long *addr) 293static __always_inline int constant_test_bit(int nr, const volatile unsigned long *addr)
@@ -295,7 +295,7 @@ static __always_inline int constant_test_bit(int nr, const volatile unsigned lon
295 return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0; 295 return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0;
296} 296}
297 297
298static inline int variable_test_bit(int nr, const volatile unsigned long * addr) 298static inline int variable_test_bit(int nr, const volatile unsigned long *addr)
299{ 299{
300 int oldbit; 300 int oldbit;
301 301
@@ -306,10 +306,10 @@ static inline int variable_test_bit(int nr, const volatile unsigned long * addr)
306 return oldbit; 306 return oldbit;
307} 307}
308 308
309#define test_bit(nr,addr) \ 309#define test_bit(nr, addr) \
310(__builtin_constant_p(nr) ? \ 310 (__builtin_constant_p(nr) ? \
311 constant_test_bit((nr),(addr)) : \ 311 constant_test_bit((nr), (addr)) : \
312 variable_test_bit((nr),(addr))) 312 variable_test_bit((nr), (addr)))
313 313
314#undef ADDR 314#undef ADDR
315 315
@@ -318,7 +318,7 @@ static inline int variable_test_bit(int nr, const volatile unsigned long * addr)
318 * @addr: The address to start the search at 318 * @addr: The address to start the search at
319 * @size: The maximum size to search 319 * @size: The maximum size to search
320 * 320 *
321 * Returns the bit-number of the first zero bit, not the number of the byte 321 * Returns the bit number of the first zero bit, not the number of the byte
322 * containing a bit. 322 * containing a bit.
323 */ 323 */
324static inline int find_first_zero_bit(const unsigned long *addr, unsigned size) 324static inline int find_first_zero_bit(const unsigned long *addr, unsigned size)
@@ -348,7 +348,7 @@ static inline int find_first_zero_bit(const unsigned long *addr, unsigned size)
348/** 348/**
349 * find_next_zero_bit - find the first zero bit in a memory region 349 * find_next_zero_bit - find the first zero bit in a memory region
350 * @addr: The address to base the search on 350 * @addr: The address to base the search on
351 * @offset: The bitnumber to start searching at 351 * @offset: The bit number to start searching at
352 * @size: The maximum size to search 352 * @size: The maximum size to search
353 */ 353 */
354int find_next_zero_bit(const unsigned long *addr, int size, int offset); 354int find_next_zero_bit(const unsigned long *addr, int size, int offset);
@@ -372,7 +372,7 @@ static inline unsigned long __ffs(unsigned long word)
372 * @addr: The address to start the search at 372 * @addr: The address to start the search at
373 * @size: The maximum size to search 373 * @size: The maximum size to search
374 * 374 *
375 * Returns the bit-number of the first set bit, not the number of the byte 375 * Returns the bit number of the first set bit, not the number of the byte
376 * containing a bit. 376 * containing a bit.
377 */ 377 */
378static inline unsigned find_first_bit(const unsigned long *addr, unsigned size) 378static inline unsigned find_first_bit(const unsigned long *addr, unsigned size)
@@ -391,7 +391,7 @@ static inline unsigned find_first_bit(const unsigned long *addr, unsigned size)
391/** 391/**
392 * find_next_bit - find the first set bit in a memory region 392 * find_next_bit - find the first set bit in a memory region
393 * @addr: The address to base the search on 393 * @addr: The address to base the search on
394 * @offset: The bitnumber to start searching at 394 * @offset: The bit number to start searching at
395 * @size: The maximum size to search 395 * @size: The maximum size to search
396 */ 396 */
397int find_next_bit(const unsigned long *addr, int size, int offset); 397int find_next_bit(const unsigned long *addr, int size, int offset);
@@ -460,10 +460,10 @@ static inline int fls(int x)
460 460
461#include <asm-generic/bitops/ext2-non-atomic.h> 461#include <asm-generic/bitops/ext2-non-atomic.h>
462 462
463#define ext2_set_bit_atomic(lock,nr,addr) \ 463#define ext2_set_bit_atomic(lock, nr, addr) \
464 test_and_set_bit((nr),(unsigned long*)addr) 464 test_and_set_bit((nr), (unsigned long *)addr)
465#define ext2_clear_bit_atomic(lock,nr, addr) \ 465#define ext2_clear_bit_atomic(lock, nr, addr) \
466 test_and_clear_bit((nr),(unsigned long*)addr) 466 test_and_clear_bit((nr), (unsigned long *)addr)
467 467
468#include <asm-generic/bitops/minix.h> 468#include <asm-generic/bitops/minix.h>
469 469