X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_bitmap.c;h=5d1cfb2965197ba853011551571e2301ec5e9a6d;hp=53712d171b0cdb1e55c26de01671b858d7303ad6;hb=ed8188fb7659cfb65b5adbe154d143190ade0324;hpb=cf6888f05f691aa1a357e7e94f9bf7b98174bbc3 diff --git a/yaffs_bitmap.c b/yaffs_bitmap.c index 53712d1..5d1cfb2 100644 --- a/yaffs_bitmap.c +++ b/yaffs_bitmap.c @@ -17,37 +17,37 @@ * Chunk bitmap manipulations */ -static Y_INLINE u8 *yaffs_block_bits(yaffs_dev_t *dev, int blk) +static Y_INLINE u8 *yaffs_block_bits(struct yaffs_dev *dev, int blk) { if (blk < dev->internal_start_block || blk > dev->internal_end_block) { T(YAFFS_TRACE_ERROR, - (TSTR("**>> yaffs: BlockBits block %d is not valid" TENDSTR), - blk)); + (TSTR("**>> yaffs: BlockBits block %d is not valid" TENDSTR), + blk)); YBUG(); } return dev->chunk_bits + - (dev->chunk_bit_stride * (blk - dev->internal_start_block)); + (dev->chunk_bit_stride * (blk - dev->internal_start_block)); } -void yaffs_verify_chunk_bit_id(yaffs_dev_t *dev, int blk, int chunk) +void yaffs_verify_chunk_bit_id(struct yaffs_dev *dev, int blk, int chunk) { if (blk < dev->internal_start_block || blk > dev->internal_end_block || - chunk < 0 || chunk >= dev->param.chunks_per_block) { + chunk < 0 || chunk >= dev->param.chunks_per_block) { T(YAFFS_TRACE_ERROR, - (TSTR("**>> yaffs: Chunk Id (%d:%d) invalid"TENDSTR), - blk, chunk)); + (TSTR("**>> yaffs: Chunk Id (%d:%d) invalid" TENDSTR), + blk, chunk)); YBUG(); } } -void yaffs_clear_chunk_bits(yaffs_dev_t *dev, int blk) +void yaffs_clear_chunk_bits(struct yaffs_dev *dev, int blk) { u8 *blk_bits = yaffs_block_bits(dev, blk); memset(blk_bits, 0, dev->chunk_bit_stride); } -void yaffs_clear_chunk_bit(yaffs_dev_t *dev, int blk, int chunk) +void yaffs_clear_chunk_bit(struct yaffs_dev *dev, int blk, int chunk) { u8 *blk_bits = yaffs_block_bits(dev, blk); @@ -56,7 +56,7 @@ void yaffs_clear_chunk_bit(yaffs_dev_t *dev, int blk, int chunk) blk_bits[chunk / 8] &= ~(1 << (chunk & 7)); } -void yaffs_set_chunk_bit(yaffs_dev_t *dev, int blk, int chunk) +void yaffs_set_chunk_bit(struct yaffs_dev *dev, int blk, int chunk) { u8 *blk_bits = yaffs_block_bits(dev, blk); @@ -65,7 +65,7 @@ void yaffs_set_chunk_bit(yaffs_dev_t *dev, int blk, int chunk) blk_bits[chunk / 8] |= (1 << (chunk & 7)); } -int yaffs_check_chunk_bit(yaffs_dev_t *dev, int blk, int chunk) +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); @@ -73,7 +73,7 @@ int yaffs_check_chunk_bit(yaffs_dev_t *dev, int blk, int chunk) return (blk_bits[chunk / 8] & (1 << (chunk & 7))) ? 1 : 0; } -int yaffs_still_some_chunks(yaffs_dev_t *dev, int blk) +int yaffs_still_some_chunks(struct yaffs_dev *dev, int blk) { u8 *blk_bits = yaffs_block_bits(dev, blk); int i; @@ -85,7 +85,7 @@ int yaffs_still_some_chunks(yaffs_dev_t *dev, int blk) return 0; } -int yaffs_count_chunk_bits(yaffs_dev_t *dev, int blk) +int yaffs_count_chunk_bits(struct yaffs_dev *dev, int blk) { u8 *blk_bits = yaffs_block_bits(dev, blk); int i; @@ -102,4 +102,3 @@ int yaffs_count_chunk_bits(yaffs_dev_t *dev, int blk) } return n; } -