From: Christoph Hellwig Date: Mon, 23 Apr 2012 15:35:28 +0000 (-0400) Subject: target: remove the unused transport_limit_task_sectors helper X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=32d8d2e4300cabb0acbf4b60fa695924be27d0d1;p=linux-beck.git target: remove the unused transport_limit_task_sectors helper Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 901fb2905aed..2b84521fa0b4 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -3694,21 +3694,6 @@ out: return -ENOMEM; } -/* Reduce sectors if they are too long for the device */ -static inline sector_t transport_limit_task_sectors( - struct se_device *dev, - unsigned long long lba, - sector_t sectors) -{ - sectors = min_t(sector_t, sectors, dev->se_sub_dev->se_dev_attrib.max_sectors); - - if (dev->transport->get_device_type(dev) == TYPE_DISK) - if ((lba + sectors) > transport_dev_end_lba(dev)) - sectors = ((transport_dev_end_lba(dev) - lba) + 1); - - return sectors; -} - /* * Break up cmd into chunks transport can handle */