aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 7e22aa7b8b8a..7ba70bef8b5d 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1436,7 +1436,7 @@ got_data:
1436 1436
1437 { 1437 {
1438 char cap_str_2[10], cap_str_10[10]; 1438 char cap_str_2[10], cap_str_10[10];
1439 u64 sz = sdkp->capacity << ffz(~sector_size); 1439 u64 sz = (u64)sdkp->capacity << ilog2(sector_size);
1440 1440
1441 string_get_size(sz, STRING_UNITS_2, cap_str_2, 1441 string_get_size(sz, STRING_UNITS_2, cap_str_2,
1442 sizeof(cap_str_2)); 1442 sizeof(cap_str_2));