]> git.karo-electronics.de Git - karo-tx-linux.git/commit
scsi: do not call do_div() with a 64-bit divisor
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 5 Nov 2013 05:55:15 +0000 (16:55 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:55:15 +0000 (16:55 +1100)
commit021e7091b34ab74fe87a43f957f698aa03c784c9
treed0a06ef0fb142e765893a3d1dc1ba95fc8d84ce7
parent7e14a5df6568215b4beee32c77bb6631abd5ebcd
scsi: do not call do_div() with a 64-bit divisor

do_div() 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 ea077b1b96e073eac5c ("m68k: Truncate base in
do_div()").

As scsi_device.sector_size is unsigned (int), factor should be unsigned
int, too.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/scsi/sd.c