Skip to content

Commit 340dbf7

Browse files
Andy GroverNicholas Bellinger
authored andcommitted
target: Don't use void* when passing dev in core_tpg_add_lun
Especially since it's actually a device. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
1 parent d344f8a commit 340dbf7

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/target/target_core_internal.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void core_tpg_add_node_to_devs(struct se_node_acl *, struct se_portal_group *);
7979
void core_tpg_wait_for_nacl_pr_ref(struct se_node_acl *);
8080
struct se_lun *core_tpg_alloc_lun(struct se_portal_group *, u32);
8181
int core_tpg_add_lun(struct se_portal_group *, struct se_lun *,
82-
u32, void *);
82+
u32, struct se_device *);
8383
struct se_lun *core_tpg_pre_dellun(struct se_portal_group *, u32 unpacked_lun);
8484
int core_tpg_post_dellun(struct se_portal_group *, struct se_lun *);
8585

‎drivers/target/target_core_tpg.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,15 +823,15 @@ int core_tpg_add_lun(
823823
struct se_portal_group *tpg,
824824
struct se_lun *lun,
825825
u32 lun_access,
826-
void *lun_ptr)
826+
struct se_device *dev)
827827
{
828828
int ret;
829829

830830
ret = percpu_ref_init(&lun->lun_ref, core_tpg_lun_ref_release);
831831
if (ret < 0)
832832
return ret;
833833

834-
ret = core_dev_export(lun_ptr, tpg, lun);
834+
ret = core_dev_export(dev, tpg, lun);
835835
if (ret < 0) {
836836
percpu_ref_cancel_init(&lun->lun_ref);
837837
return ret;

0 commit comments

Comments
 (0)