[PATCH] blk: remove BLK_TAGS_{PER_LONG|MASK}
authorTejun Heo <htejun@gmail.com>
Thu, 23 Jun 2005 07:08:50 +0000 (00:08 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 23 Jun 2005 16:45:15 +0000 (09:45 -0700)
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>
drivers/block/ll_rw_blk.c
include/linux/blkdev.h

index 896d17c28f427b5d830525bdfcd89d686c126678..99afeec1031fe7bba0eb2ad47515b693ce5c152e 100644 (file)
@@ -789,7 +789,7 @@ init_tag_map(request_queue_t *q, struct blk_queue_tag *tags, int depth)
        if (!tag_index)
                goto fail;
 
-       nr_ulongs = ALIGN(depth, BLK_TAGS_PER_LONG) / BLK_TAGS_PER_LONG;
+       nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG;
        tag_map = kmalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC);
        if (!tag_map)
                goto fail;
@@ -880,7 +880,7 @@ int blk_queue_resize_tags(request_queue_t *q, int new_depth)
                return -ENOMEM;
 
        memcpy(bqt->tag_index, tag_index, max_depth * sizeof(struct request *));
-       nr_ulongs = ALIGN(max_depth, BLK_TAGS_PER_LONG) / BLK_TAGS_PER_LONG;
+       nr_ulongs = ALIGN(max_depth, BITS_PER_LONG) / BITS_PER_LONG;
        memcpy(bqt->tag_map, tag_map, nr_ulongs * sizeof(unsigned long));
 
        kfree(tag_index);
index 8d7e2f4151d0a20b2c19ec9f69dd254b620be5e4..60272141ff1976c57c3f4f58daf514d2f79d0e52 100644 (file)
@@ -285,9 +285,6 @@ enum blk_queue_state {
        Queue_up,
 };
 
-#define BLK_TAGS_PER_LONG      (sizeof(unsigned long) * 8)
-#define BLK_TAGS_MASK          (BLK_TAGS_PER_LONG - 1)
-
 struct blk_queue_tag {
        struct request **tag_index;     /* map of busy tags */
        unsigned long *tag_map;         /* bit map of free/busy tags */