Skip to content
Commit 520a2c27 authored by H. Peter Anvin's avatar H. Peter Anvin Committed by James Bottomley
Browse files

[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: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent a8659597
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