target/tcmu: Use macro to call container_of in tcmu_cmd_time_out_show
authorKenjiro Nakayama <nakayamakenjiro@gmail.com>
Fri, 15 Sep 2017 05:44:55 +0000 (14:44 +0900)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 4 Nov 2017 21:52:39 +0000 (14:52 -0700)
This patch makes a tiny change that using TCMU_DEV in
tcmu_cmd_time_out_show so it is consistent with other functions.

Signed-off-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_user.c

index 8b9ec0fc91c22fe7ffc84da93014975576f1f909..2dd329773249f195f4f75ff1113809492613550f 100644 (file)
@@ -1736,8 +1736,7 @@ static ssize_t tcmu_cmd_time_out_show(struct config_item *item, char *page)
 {
        struct se_dev_attrib *da = container_of(to_config_group(item),
                                        struct se_dev_attrib, da_group);
-       struct tcmu_dev *udev = container_of(da->da_dev,
-                                       struct tcmu_dev, se_dev);
+       struct tcmu_dev *udev = TCMU_DEV(da->da_dev);
 
        return snprintf(page, PAGE_SIZE, "%lu\n", udev->cmd_time_out / MSEC_PER_SEC);
 }