03_blk_tag_map_remove_BLK_TAGS_PER_LONG.patch

        Replace BLK_TAGS_PER_LONG with BITS_PER_LONG and remove unused
        BLK_TAGS_MASK.

Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>

 drivers/block/ll_rw_blk.c |    4 ++--
 include/linux/blkdev.h    |    3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

Index: blk-fixes/drivers/block/ll_rw_blk.c
===================================================================
--- blk-fixes.orig/drivers/block/ll_rw_blk.c    2005-04-20 20:36:37.000000000 
+0900
+++ blk-fixes/drivers/block/ll_rw_blk.c 2005-04-20 20:36:38.000000000 +0900
@@ -788,7 +788,7 @@ init_tag_map(request_queue_t *q, struct 
        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;
@@ -879,7 +879,7 @@ int blk_queue_resize_tags(request_queue_
                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: blk-fixes/include/linux/blkdev.h
===================================================================
--- blk-fixes.orig/include/linux/blkdev.h       2005-04-20 20:36:37.000000000 
+0900
+++ blk-fixes/include/linux/blkdev.h    2005-04-20 20:36:38.000000000 +0900
@@ -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 */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to