]> git.ozlabs.org Git - yaboot.git/blobdiff - include/ext2fs/bitops.h
Sweep all the files for trailing whitespace.
[yaboot.git] / include / ext2fs / bitops.h
index 7872b3672ce0d49dbc2ca9cd324c46706adf2aa5..85fa7d7f4b9964f970fcfecad9fa75ce38c2f7d0 100644 (file)
@@ -1,14 +1,14 @@
 /*
  * bitops.h --- Bitmap frobbing code.  The byte swapping routines are
  *     also included here.
- * 
+ *
  * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o.
  *
  * %Begin-Header%
  * This file may be redistributed under the terms of the GNU Public
  * License.
  * %End-Header%
- * 
+ *
  * i386 bitops operations taken from <asm/bitops.h>, Copyright 1992,
  * Linus Torvalds.
  */
@@ -79,7 +79,7 @@ extern void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map);
 
 /*
  * The inline routines themselves...
- * 
+ *
  * If NO_INLINE_FUNCS is defined, then we won't try to do inline
  * functions at all; they will be included as normal functions in
  * inline.c
@@ -125,7 +125,7 @@ extern void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map);
  */
 struct __dummy_h { unsigned long a[100]; };
 #define EXT2FS_ADDR (*(struct __dummy_h *) addr)
-#define EXT2FS_CONST_ADDR (*(const struct __dummy_h *) addr)   
+#define EXT2FS_CONST_ADDR (*(const struct __dummy_h *) addr)
 
 _INLINE_ int ext2fs_set_bit(int nr, void * addr)
 {
@@ -167,7 +167,7 @@ _INLINE_ int ext2fs_find_first_bit_set(void * addr, unsigned size)
                return 0;
        /* This looks at memory. Mark it volatile to tell gcc not to move it around */
        __asm__ __volatile__(
-               "cld\n\t"                            
+               "cld\n\t"
                "xorl %%eax,%%eax\n\t"
                "xorl %%edx,%%edx\n\t"
                "repe; scasl\n\t"
@@ -187,7 +187,7 @@ _INLINE_ int ext2fs_find_next_bit_set (void * addr, int size, int offset)
 {
        unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
        int set = 0, bit = offset & 31, res;
-       
+
        if (bit) {
                /*
                 * Look for zero in first byte
@@ -330,7 +330,7 @@ _INLINE_ int ext2fs_clear_bit(int nr, void * addr)
        : "0" (ADDR), "r" (mask)
        : "g5", "g6");
        return (int) ADDR;
-       
+
 #else
        int             mask, retval;
        unsigned char   *ADDR = (unsigned char *) addr;
@@ -425,7 +425,7 @@ _INLINE_ int ext2fs_find_first_bit_set(void * addr, unsigned size)
        d0 = ffs(*cp);
        if (d0 == 0)
                return size;
-       
+
        return res + d0 - 1;
 }
 
@@ -433,10 +433,10 @@ _INLINE_ int ext2fs_find_next_bit_set (void * addr, int size, int offset)
 {
        unsigned char * p;
        int set = 0, bit = offset & 7, res = 0, d0;
-       
+
        res = offset >> 3;
        p = ((unsigned char *) addr) + res;
-       
+
        if (bit) {
                set = ffs(*p & ~((1 << bit) - 1));
                if (set)
@@ -454,7 +454,7 @@ _INLINE_ int ext2fs_find_next_bit_set (void * addr, int size, int offset)
 
        return (res + d0 - 1);
 }
-#endif 
+#endif
 
 /* These two routines moved to gen_bitmap.c */
 extern int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
@@ -485,35 +485,35 @@ _INLINE_ int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap,
 _INLINE_ int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap,
                                         blk_t block)
 {
-       return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap, 
+       return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap,
                                            block);
 }
 
 _INLINE_ int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap,
                                       blk_t block)
 {
-       return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap, 
+       return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap,
                                          block);
 }
 
 _INLINE_ int ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap,
                                       ext2_ino_t inode)
 {
-       return ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap, 
+       return ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap,
                                          inode);
 }
 
 _INLINE_ int ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap,
                                         ext2_ino_t inode)
 {
-       return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap, 
+       return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap,
                                     inode);
 }
 
 _INLINE_ int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap,
                                       ext2_ino_t inode)
 {
-       return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap, 
+       return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap,
                                          inode);
 }
 
@@ -526,7 +526,7 @@ _INLINE_ void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap,
                                   bitmap->description);
                return;
        }
-#endif 
+#endif
        ext2fs_set_bit(block - bitmap->start, bitmap->bitmap);
 }
 
@@ -655,7 +655,7 @@ _INLINE_ void ext2fs_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
                                             blk_t block, int num)
 {
        int     i;
-       
+
        if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
                ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_MARK, block,
                                   bitmap->description);
@@ -669,14 +669,14 @@ _INLINE_ void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap,
                                                  blk_t block, int num)
 {
        int     i;
-       
+
 #ifdef EXT2FS_DEBUG_FAST_OPS
        if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
                ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_MARK, block,
                                   bitmap->description);
                return;
        }
-#endif 
+#endif
        for (i=0; i < num; i++)
                ext2fs_set_bit(block + i - bitmap->start, bitmap->bitmap);
 }
@@ -685,7 +685,7 @@ _INLINE_ void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
                                               blk_t block, int num)
 {
        int     i;
-       
+
        if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
                ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_UNMARK, block,
                                   bitmap->description);
@@ -699,14 +699,14 @@ _INLINE_ void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
                                                    blk_t block, int num)
 {
        int     i;
-       
+
 #ifdef EXT2FS_DEBUG_FAST_OPS
        if ((block < bitmap->start) || (block+num-1 > bitmap->end)) {
                ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_UNMARK, block,
                                   bitmap->description);
                return;
        }
-#endif 
+#endif
        for (i=0; i < num; i++)
                ext2fs_clear_bit(block + i - bitmap->start, bitmap->bitmap);
 }