OSDN Git Service
(root)
/
linux-kernel-docs
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[SCSI] sd: fix computation of the full size of the device
[linux-kernel-docs/linux-2.6.git]
/
drivers
/
scsi
/
sd.c
diff --git
a/drivers/scsi/sd.c
b/drivers/scsi/sd.c
index
7e22aa7
..
7ba70be
100644
(file)
--- a/
drivers/scsi/sd.c
+++ b/
drivers/scsi/sd.c
@@
-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));