Commit db7aff0b authored by James Bottomley's avatar James Bottomley

[PATCH scsi] use sector_div in scsicam.c

Thanks to Patrick Mansfield for pointing this out.
parent 496a57cb
......@@ -80,11 +80,11 @@ int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip)
if (ret || ip[0] > 255 || ip[1] > 63) {
ip[0] = 64;
ip[1] = 32;
if ((capacity / (ip[0] * ip[1])) > 65534) {
if (sector_div(capacity, ip[0] * ip[1]) > 65534) {
ip[0] = 255;
ip[1] = 63;
}
ip[2] = capacity / (ip[0] * ip[1]);
ip[2] = sector_div(capacity, ip[0] * ip[1]);
}
return 0;
......
Markdown is supported
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