From b54441534e9648f8df24b75a63bb00ed3aa123de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20H=C3=B6ppner?= <hoeppner@linux.ibm.com>
Date: Tue, 29 May 2018 14:11:25 +0200
Subject: [PATCH] s390/dasd: Use ALIGN_DOWN macro
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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>
---
 drivers/s390/block/dasd_fba.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
index 79fbe0d68a8d9..cbb770824226f 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)
 
 	/* Calculate max_discard_sectors and make it PAGE aligned */
 	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;
 
 	blk_queue_max_discard_sectors(q, max_discard_sectors);
-- 
GitLab