aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_user.c
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2018-06-07 02:31:36 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2018-06-18 21:05:32 -0400
commit9554c1be48b437f192234eebb89f124ba3ef0e25 (patch)
treeef15f3efa3c3f2748661f51e6c1d356736ed87cc /drivers/target/target_core_user.c
parentLinux 4.18-rc1 (diff)
downloadlinux-dev-9554c1be48b437f192234eebb89f124ba3ef0e25.tar.xz
linux-dev-9554c1be48b437f192234eebb89f124ba3ef0e25.zip
scsi: tcmu: remove useless code and clean up the code style.
Since the TCMU_RING_SIZE macro is not using here will discard it and at the same time clean up the code style. Signed-off-by: Xiubo Li <xiubli@redhat.com> Acked-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r--drivers/target/target_core_user.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index 7f96dfa32b9c..e4a76f9771ce 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -83,14 +83,10 @@
#define DATA_BLOCK_SIZE PAGE_SIZE
#define DATA_BLOCK_SHIFT PAGE_SHIFT
#define DATA_BLOCK_BITS_DEF (256 * 1024)
-#define DATA_SIZE (DATA_BLOCK_BITS * DATA_BLOCK_SIZE)
#define TCMU_MBS_TO_BLOCKS(_mbs) (_mbs << (20 - DATA_BLOCK_SHIFT))
#define TCMU_BLOCKS_TO_MBS(_blocks) (_blocks >> (20 - DATA_BLOCK_SHIFT))
-/* The total size of the ring is 8M + 256K * PAGE_SIZE */
-#define TCMU_RING_SIZE (CMDR_SIZE + DATA_SIZE)
-
/*
* Default number of global data blocks(512K * PAGE_SIZE)
* when the unmap thread will be started.
@@ -283,7 +279,7 @@ static int tcmu_genl_cmd_done(struct genl_info *info, int completed_cmd)
if (!info->attrs[TCMU_ATTR_CMD_STATUS] ||
!info->attrs[TCMU_ATTR_DEVICE_ID]) {
printk(KERN_ERR "TCMU_ATTR_CMD_STATUS or TCMU_ATTR_DEVICE_ID not set, doing nothing\n");
- return -EINVAL;
+ return -EINVAL;
}
dev_id = nla_get_u32(info->attrs[TCMU_ATTR_DEVICE_ID]);
@@ -313,7 +309,7 @@ static int tcmu_genl_cmd_done(struct genl_info *info, int completed_cmd)
spin_unlock(&udev->nl_cmd_lock);
if (!is_removed)
- target_undepend_item(&dev->dev_group.cg_item);
+ target_undepend_item(&dev->dev_group.cg_item);
if (!ret)
complete(&nl_cmd->complete);
return ret;