minix: replace inode uid,gid,mode init with helper
[safe/jmp/linux-2.6] / fs / omfs / bitmap.c
index dc75f22..0822345 100644 (file)
@@ -71,10 +71,10 @@ static int set_run(struct super_block *sb, int map,
                }
                if (set) {
                        set_bit(bit, sbi->s_imap[map]);
-                       set_bit(bit, (long *) bh->b_data);
+                       set_bit(bit, (unsigned long *)bh->b_data);
                } else {
                        clear_bit(bit, sbi->s_imap[map]);
-                       clear_bit(bit, (long *) bh->b_data);
+                       clear_bit(bit, (unsigned long *)bh->b_data);
                }
        }
        mark_buffer_dirty(bh);
@@ -85,14 +85,14 @@ out:
 }
 
 /*
- * Tries to allocate exactly one block.  Returns true if sucessful.
+ * Tries to allocate exactly one block.  Returns true if successful.
  */
 int omfs_allocate_block(struct super_block *sb, u64 block)
 {
        struct buffer_head *bh;
        struct omfs_sb_info *sbi = OMFS_SB(sb);
        int bits_per_entry = 8 * sb->s_blocksize;
-       int map, bit;
+       unsigned int map, bit;
        int ret = 0;
        u64 tmp;
 
@@ -109,7 +109,7 @@ int omfs_allocate_block(struct super_block *sb, u64 block)
                if (!bh)
                        goto out;
 
-               set_bit(bit, (long *) bh->b_data);
+               set_bit(bit, (unsigned long *)bh->b_data);
                mark_buffer_dirty(bh);
                brelse(bh);
        }
@@ -176,7 +176,8 @@ int omfs_clear_range(struct super_block *sb, u64 block, int count)
        struct omfs_sb_info *sbi = OMFS_SB(sb);
        int bits_per_entry = 8 * sb->s_blocksize;
        u64 tmp;
-       int map, bit, ret;
+       unsigned int map, bit;
+       int ret;
 
        tmp = block;
        bit = do_div(tmp, bits_per_entry);