Skip to content

Commit

Permalink
s390/dasd: Use ALIGN_DOWN macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Höppner authored and Vasily Gorbik committed Jul 11, 2019
1 parent a0610a8 commit b544415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/s390/block/dasd_fba.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b544415

Please sign in to comment.