From fb25e7349df57b56c50d48be7630b9c3d534456d Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 8 Dec 2021 12:25:09 -0500 Subject: [PATCH] scsi_cd: Remove unused code. --- .../drivers/disk/scsi/scsi_cd/scsi_cd.cpp | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp b/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp index 17bf4c05c0..60ad4e0e65 100644 --- a/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp +++ b/src/add-ons/kernel/drivers/disk/scsi/scsi_cd/scsi_cd.cpp @@ -655,20 +655,6 @@ read_cd(cd_driver_info *info, const scsi_read_cd *readCD) } -static int -log2(uint32 x) -{ - int y; - - for (y = 31; y >= 0; --y) { - if (x == (1UL << y)) - break; - } - - return y; -} - - static status_t do_io(void* cookie, IOOperation* operation) { @@ -974,12 +960,6 @@ cd_set_capacity(cd_driver_info* info, uint64 capacity, uint32 blockSize) TRACE("cd_set_capacity(info = %p, capacity = %Ld, blockSize = %ld)\n", info, capacity, blockSize); - // get log2, if possible - uint32 blockShift = log2(blockSize); - - if ((1UL << blockShift) != blockSize) - blockShift = 0; - if (info->block_size != blockSize) { if (capacity == 0) { // there is obviously no medium in the drive, don't try to update