]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/sd.c
[SCSI] sd: fix computation of the full size of the device
[linux-2.6-omap-h63xx.git] / drivers / scsi / sd.c
index 7e22aa7b8b8a9072f806497bbfed7377fa09e86f..7ba70bef8b5d03e8f5cd41ab35e2906123381e56 100644 (file)
@@ -1436,7 +1436,7 @@ got_data:
 
        {
                char cap_str_2[10], cap_str_10[10];
-               u64 sz = sdkp->capacity << ffz(~sector_size);
+               u64 sz = (u64)sdkp->capacity << ilog2(sector_size);
 
                string_get_size(sz, STRING_UNITS_2, cap_str_2,
                                sizeof(cap_str_2));