scsi_disk: Remove unused blockShift and log2.

These were used when this driver was first introduced,
but are no longer.
This commit is contained in:
Augustin Cavalier
2023-05-22 18:10:28 -04:00
parent 74d2e61ee2
commit 5d4fe207c7
@@ -219,20 +219,6 @@ trim_device(das_driver_info* device, fs_trim_data* trimData)
}
static int
log2(uint32 x)
{
int y;
for (y = 31; y >= 0; --y) {
if (x == ((uint32)1 << y))
break;
}
return y;
}
static status_t
do_io(void* cookie, IOOperation* operation)
{
@@ -425,12 +411,6 @@ das_set_capacity(das_driver_info* info, uint64 capacity, uint32 blockSize, uint3
TRACE("das_set_capacity(device = %p, capacity = %" B_PRIu64
", blockSize = %" B_PRIu32 ")\n", info, capacity, blockSize);
// get log2, if possible
uint32 blockShift = log2(blockSize);
if ((1UL << blockShift) != blockSize)
blockShift = 0;
info->capacity = capacity;
if (info->block_size != blockSize) {