Skip to content
Commit 3f7705ea authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds
Browse files

[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: default avatarMatthew Wilcox <matthew@wil.cx>
Acked-by: default avatarMike Miller <mike.miller@hp.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8a7822a6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment