diff options
author | Jan Höppner <hoeppner@linux.vnet.ibm.com> | 2016-06-30 13:18:16 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-10-28 10:09:01 +0200 |
commit | 62ba6f85ee3f3e5c908af0ff7d6e0ae1cd399b85 (patch) | |
tree | 02b5d8aef2794a7603c203fa9c9ed9228895d5bb /drivers/s390/block | |
parent | s390/dasd: Make setting queue_max_segments more explicit (diff) | |
download | linux-62ba6f85ee3f3e5c908af0ff7d6e0ae1cd399b85.tar.xz linux-62ba6f85ee3f3e5c908af0ff7d6e0ae1cd399b85.zip |
s390/dasd: Define often used variable
block->request_queue is used many times in dasd_setup_queue. Define a
separate variable to increase readability a bit and to make it better
reusable.
Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r-- | drivers/s390/block/dasd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 6a0c9df8f323..a4388f59c39f 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -3121,6 +3121,7 @@ static int dasd_alloc_queue(struct dasd_block *block) */ static void dasd_setup_queue(struct dasd_block *block) { + struct request_queue *q = block->request_queue; int max; if (block->base->features & DASD_FEATURE_USERAW) { @@ -3135,17 +3136,16 @@ static void dasd_setup_queue(struct dasd_block *block) } else { max = block->base->discipline->max_blocks << block->s2b_shift; } - queue_flag_set_unlocked(QUEUE_FLAG_NONROT, block->request_queue); - block->request_queue->limits.max_dev_sectors = max; - blk_queue_logical_block_size(block->request_queue, - block->bp_block); - blk_queue_max_hw_sectors(block->request_queue, max); - blk_queue_max_segments(block->request_queue, USHRT_MAX); + queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q); + q->limits.max_dev_sectors = max; + blk_queue_logical_block_size(q, block->bp_block); + blk_queue_max_hw_sectors(q, max); + blk_queue_max_segments(q, USHRT_MAX); /* with page sized segments we can translate each segement into * one idaw/tidaw */ - blk_queue_max_segment_size(block->request_queue, PAGE_SIZE); - blk_queue_segment_boundary(block->request_queue, PAGE_SIZE - 1); + blk_queue_max_segment_size(q, PAGE_SIZE); + blk_queue_segment_boundary(q, PAGE_SIZE - 1); } /* |