aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2005-06-23 03:08:50 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 12:45:15 -0400
commitf7d37d028dfba90b1b747f8ac685bf0959aeda8b (patch)
tree38627ec042c05f42feddff2ada95290ebe73679e
parentfa72b903f75e4f0f0b2c2feed093005167da4023 (diff)
[PATCH] blk: remove BLK_TAGS_{PER_LONG|MASK}
Replace BLK_TAGS_PER_LONG with BITS_PER_LONG and remove unused BLK_TAGS_MASK. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/block/ll_rw_blk.c4
-rw-r--r--include/linux/blkdev.h3
2 files changed, 2 insertions, 5 deletions
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c
index 896d17c28f42..99afeec1031f 100644
--- a/drivers/block/ll_rw_blk.c
+++ b/drivers/block/ll_rw_blk.c
@@ -789,7 +789,7 @@ init_tag_map(request_queue_t *q, struct blk_queue_tag *tags, int depth)
789 if (!tag_index) 789 if (!tag_index)
790 goto fail; 790 goto fail;
791 791
792 nr_ulongs = ALIGN(depth, BLK_TAGS_PER_LONG) / BLK_TAGS_PER_LONG; 792 nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG;
793 tag_map = kmalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC); 793 tag_map = kmalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC);
794 if (!tag_map) 794 if (!tag_map)
795 goto fail; 795 goto fail;
@@ -880,7 +880,7 @@ int blk_queue_resize_tags(request_queue_t *q, int new_depth)
880 return -ENOMEM; 880 return -ENOMEM;
881 881
882 memcpy(bqt->tag_index, tag_index, max_depth * sizeof(struct request *)); 882 memcpy(bqt->tag_index, tag_index, max_depth * sizeof(struct request *));
883 nr_ulongs = ALIGN(max_depth, BLK_TAGS_PER_LONG) / BLK_TAGS_PER_LONG; 883 nr_ulongs = ALIGN(max_depth, BITS_PER_LONG) / BITS_PER_LONG;
884 memcpy(bqt->tag_map, tag_map, nr_ulongs * sizeof(unsigned long)); 884 memcpy(bqt->tag_map, tag_map, nr_ulongs * sizeof(unsigned long));
885 885
886 kfree(tag_index); 886 kfree(tag_index);
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 8d7e2f4151d0..60272141ff19 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -285,9 +285,6 @@ enum blk_queue_state {
285 Queue_up, 285 Queue_up,
286}; 286};
287 287
288#define BLK_TAGS_PER_LONG (sizeof(unsigned long) * 8)
289#define BLK_TAGS_MASK (BLK_TAGS_PER_LONG - 1)
290
291struct blk_queue_tag { 288struct blk_queue_tag {
292 struct request **tag_index; /* map of busy tags */ 289 struct request **tag_index; /* map of busy tags */
293 unsigned long *tag_map; /* bit map of free/busy tags */ 290 unsigned long *tag_map; /* bit map of free/busy tags */