diff options
author | Jan Höppner <hoeppner@linux.ibm.com> | 2018-05-29 08:11:25 -0400 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2019-07-11 14:39:54 -0400 |
commit | b54441534e9648f8df24b75a63bb00ed3aa123de (patch) | |
tree | f2bee941be59e76cbeea10270ce2b11e327ea567 | |
parent | a0610a8ad80743ff916ebef0490418a298e5bd23 (diff) |
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>
-rw-r--r-- | drivers/s390/block/dasd_fba.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index 79fbe0d68a8d..cbb770824226 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
@@ -794,7 +794,7 @@ static void dasd_fba_setup_blk_queue(struct dasd_block *block) | |||
794 | 794 | ||
795 | /* Calculate max_discard_sectors and make it PAGE aligned */ | 795 | /* Calculate max_discard_sectors and make it PAGE aligned */ |
796 | max_bytes = USHRT_MAX * logical_block_size; | 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 | max_discard_sectors = max_bytes / logical_block_size; | 798 | max_discard_sectors = max_bytes / logical_block_size; |
799 | 799 | ||
800 | blk_queue_max_discard_sectors(q, max_discard_sectors); | 800 | blk_queue_max_discard_sectors(q, max_discard_sectors); |