]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[SCSI] sd: Do not call do_div() with a 64-bit divisor
authorGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 4 Nov 2013 09:21:05 +0000 (10:21 +0100)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 17 Dec 2013 14:26:33 +0000 (06:26 -0800)
commit6d0e65b19169f9f96b419e9e6bbeab360cb0c518
treefba31a0cb879677c964b121e120858654d6828cf
parent2573a9a4751e38eaf1aed2a9720f8dbb0cc685d0
[SCSI] sd: 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 ea077b1b96e073eac5c3c5590529e964767fc5f7 ("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: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/sd.c