Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

authored by

Jan Höppner and committed by
Vasily Gorbik
b5444153 a0610a8a

+1 -1
+1 -1
drivers/s390/block/dasd_fba.c
··· 794 794 795 795 /* Calculate max_discard_sectors and make it PAGE aligned */ 796 796 max_bytes = USHRT_MAX * logical_block_size; 797 - max_bytes = ALIGN(max_bytes, PAGE_SIZE) - PAGE_SIZE; 797 + max_bytes = ALIGN_DOWN(max_bytes, PAGE_SIZE); 798 798 max_discard_sectors = max_bytes / logical_block_size; 799 799 800 800 blk_queue_max_discard_sectors(q, max_discard_sectors);