summaryrefslogtreecommitdiffstats
path: root/block/Kconfig.iosched
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-11-04 14:00:06 +0100
committerJens Axboe <axboe@kernel.dk>2013-11-08 09:04:46 -0700
commit97597dc08f58e25bc74154b7d1c387a4c0432950 (patch)
tree0d904cb15553db7ee1c624dfa1ae4706da779bfe /block/Kconfig.iosched
parentf8c5e94486671ffcac696886c246baa6ba89b5cf (diff)
downloadlinux-97597dc08f58e25bc74154b7d1c387a4c0432950.tar.bz2
block: Do not call sector_div() with a 64-bit divisor
do_div() (called by sector_div() if CONFIG_LBDAF=y) is meant for divisions of 64-bit number by 32-bit numbers. Passing 64-bit divisor types caused issues in the past on 32-bit platforms, cfr. commit ea077b1b96e073eac5c3c5590529e964767fc5f7 ("m68k: Truncate base in do_div()"). As queue_limits.max_discard_sectors and .discard_granularity are unsigned int, max_discard_sectors and granularity should be unsigned int. As bdev_discard_alignment() returns int, alignment should be int. Now 2 calls to sector_div() can be replaced by 32-bit arithmetic: - The 64-bit modulo operation can become a 32-bit modulo operation, - The 64-bit division and multiplication can be replaced by a 32-bit modulo operation and a subtraction. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/Kconfig.iosched')
0 files changed, 0 insertions, 0 deletions