diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2021-02-27 21:56:25 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-03-09 23:47:17 -0500 |
commit | c151eddbef7eb67322e8187d763953e9c70d4bac (patch) | |
tree | eac45154a733d0dfa810f44aa43133b832e09655 /drivers/target | |
parent | a2c6c6a3b1ff4c1094f10ee581309d80568649a0 (diff) |
scsi: target: iblock: Fix type of logs_per_phys
According to ilog2() it expects 32/64 bit unsigned value.
" 147 * ilog2 - log base 2 of 32-bit or a 64-bit unsigned value"
Replace type of logs_per_phys from int to unsigned int.
Link: https://lore.kernel.org/r/20210228055645.22253-4-chaitanya.kulkarni@wdc.com
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_iblock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index 3851f9ea26c2..d6fdd1c61f90 100644 --- a/drivers/target/target_core_iblock.c +++ b/drivers/target/target_core_iblock.c @@ -853,7 +853,7 @@ static unsigned int iblock_get_lbppbe(struct se_device *dev) { struct iblock_dev *ib_dev = IBLOCK_DEV(dev); struct block_device *bd = ib_dev->ibd_bd; - int logs_per_phys = + unsigned int logs_per_phys = bdev_physical_block_size(bd) / bdev_logical_block_size(bd); return ilog2(logs_per_phys); |