Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5444153 authored by Jan Höppner's avatar Jan Höppner Committed by Vasily Gorbik
Browse files

s390/dasd: Use ALIGN_DOWN macro



There is now an ALIGN_DOWN macro available. Let's rather use kernel
provided macros that do the things we want.

Signed-off-by: default avatarJan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: default avatarStefan Haberland <sth@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent a0610a8a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -794,7 +794,7 @@ static void dasd_fba_setup_blk_queue(struct dasd_block *block)


	/* Calculate max_discard_sectors and make it PAGE aligned */
	/* Calculate max_discard_sectors and make it PAGE aligned */
	max_bytes = USHRT_MAX * logical_block_size;
	max_bytes = USHRT_MAX * logical_block_size;
	max_bytes = ALIGN(max_bytes, PAGE_SIZE) - PAGE_SIZE;
	max_bytes = ALIGN_DOWN(max_bytes, PAGE_SIZE);
	max_discard_sectors = max_bytes / logical_block_size;
	max_discard_sectors = max_bytes / logical_block_size;


	blk_queue_max_discard_sectors(q, max_discard_sectors);
	blk_queue_max_discard_sectors(q, max_discard_sectors);