From 5303e6578f4a57e3be13a60825d3ae9f0d18af36 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20H=C3=B6ppner?= Date: Thu, 30 Jun 2016 12:58:51 +0200 Subject: [PATCH] s390/dasd: Make setting queue_max_segments more explicit MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Currently the block queue value max_segments is set to -1L, which is then implicitly casted to unsigned short in blk_queue_max_segments. This results in 65535 (64k) max_segments. Even though the resulting value is correct, setting it implicitly using -1L is rather confusing. Set the value explicitly using the USHRT_MAX macro instead. Reviewed-by: Stefan Haberland Signed-off-by: Jan Höppner Signed-off-by: Martin Schwidefsky --- drivers/s390/block/dasd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 1de0890..6a0c9df 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -3140,7 +3140,7 @@ static void dasd_setup_queue(struct dasd_block *block) 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, -1L); + blk_queue_max_segments(block->request_queue, USHRT_MAX); /* with page sized segments we can translate each segement into * one idaw/tidaw */ -- 2.7.4