]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[SCSI] sd: fix computation of the full size of the device
authorH. Peter Anvin <hpa@zytor.com>
Tue, 14 Oct 2008 18:34:20 +0000 (11:34 -0700)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 23 Oct 2008 16:42:20 +0000 (11:42 -0500)
commit520a2c2741747062e75f91cd0faddb564fbc64d2
treeee432a78dd07631a4df63abe4ae2958d2c18607e
parenta8659597bf744b0f8d2560e2a734b5c941569e0e
[SCSI] sd: fix computation of the full size of the device

When computing the full size of the device, we need to cast
sdkp->capacity before shifting, since in some configurations sector_t
can be a 32-bit number.

Also, change ffz(~x) to the more idiomatic ilog2(x).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/sd.c