]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] cciss: Fix warnings (and bug on 1TB discs)
authorMatthew Wilcox <matthew@wil.cx>
Sat, 21 Oct 2006 17:24:19 +0000 (10:24 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 21 Oct 2006 20:35:06 +0000 (13:35 -0700)
commit3f7705eab6722ad1a346d748c4aad55755d6c241
treed6284a55119568e4a53ce31e35f91245a613d09e
parent8a7822a61ca9c22f464c0b79f455e62cccee747e
[PATCH] cciss: Fix warnings (and bug on 1TB discs)

CCISS was producing warnings about shifts being greater than the size of
the type and pointers being of incompatible type.  Turns out this is
because it's calling do_div on a 32-bit quantity.  Upon further
investigation, the sector_t total_size is being assigned to an int, and
then we're calling do_div on that int.  Obviously, sector_div is called for
here, and I took the chance to refactor the code a little.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/cciss.c