summaryrefslogtreecommitdiff
path: root/yaffs_bitmap.c
diff options
context:
space:
mode:
authorCharles Manning <cdhmanning@gmail.com>2011-01-13 13:21:47 +1300
committerCharles Manning <cdhmanning@gmail.com>2011-01-13 13:21:47 +1300
commit46eb953ecab322d3385ccf84c75d969de8542317 (patch)
treeef59001d4a8561827571c332a11fb51ed0d6d9bf /yaffs_bitmap.c
parent05f5305b2d17b0e2889338724b864cf80f309437 (diff)
yaffs: Reformatting to be kernel friendly.
Passes checkpatch.pl Signed-off-by: Charles Manning <cdhmanning@gmail.com>
Diffstat (limited to 'yaffs_bitmap.c')
-rw-r--r--yaffs_bitmap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/yaffs_bitmap.c b/yaffs_bitmap.c
index 7df42cd..dc673e8 100644
--- a/yaffs_bitmap.c
+++ b/yaffs_bitmap.c
@@ -52,7 +52,6 @@ void yaffs_clear_chunk_bit(struct yaffs_dev *dev, int blk, int chunk)
u8 *blk_bits = yaffs_block_bits(dev, blk);
yaffs_verify_chunk_bit_id(dev, blk, chunk);
-
blk_bits[chunk / 8] &= ~(1 << (chunk & 7));
}
@@ -61,15 +60,14 @@ void yaffs_set_chunk_bit(struct yaffs_dev *dev, int blk, int chunk)
u8 *blk_bits = yaffs_block_bits(dev, blk);
yaffs_verify_chunk_bit_id(dev, blk, chunk);
-
blk_bits[chunk / 8] |= (1 << (chunk & 7));
}
int yaffs_check_chunk_bit(struct yaffs_dev *dev, int blk, int chunk)
{
u8 *blk_bits = yaffs_block_bits(dev, blk);
- yaffs_verify_chunk_bit_id(dev, blk, chunk);
+ yaffs_verify_chunk_bit_id(dev, blk, chunk);
return (blk_bits[chunk / 8] & (1 << (chunk & 7))) ? 1 : 0;
}
@@ -77,6 +75,7 @@ int yaffs_still_some_chunks(struct yaffs_dev *dev, int blk)
{
u8 *blk_bits = yaffs_block_bits(dev, blk);
int i;
+
for (i = 0; i < dev->chunk_bit_stride; i++) {
if (*blk_bits)
return 1;