Whamcloud - gitweb
LU-6142 lustre: remove module_vars arg to class_register_type() 83/39383/3
authorMr NeilBrown <neilb@suse.de>
Wed, 15 Jul 2020 06:32:47 +0000 (16:32 +1000)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 21:41:58 +0000 (21:41 +0000)
The module_vars arg to class_register_type() is always NULL.  So it
can be removed.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ie8d7e79075ba068dec606cc9dfcc38a90e371e5b
Reviewed-on: https://review.whamcloud.com/39383
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
20 files changed:
lustre/include/obd_class.h
lustre/lmv/lmv_obd.c
lustre/lod/lod_dev.c
lustre/lov/lov_obd.c
lustre/mdc/mdc_request.c
lustre/mdd/mdd_device.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_mds.c
lustre/mgc/mgc_request.c
lustre/mgs/mgs_handler.c
lustre/obdclass/genops.c
lustre/obdclass/llog_test.c
lustre/obdecho/echo_client.c
lustre/ofd/ofd_dev.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-zfs/osd_handler.c
lustre/osp/osp_dev.c
lustre/ost/ost_handler.c
lustre/quota/qmt_dev.c

index 5c6e25e..8114658 100644 (file)
@@ -74,7 +74,6 @@ struct obd_type *class_add_symlinks(const char *name, bool enable_proc);
 #endif
 int class_register_type(const struct obd_ops *dt_ops,
                        const struct md_ops *md_ops, bool enable_proc,
-                       struct ldebugfs_vars *module_vars,
                        const char *nm, struct lu_device_type *ldt);
 int class_unregister_type(const char *nm);
 
index b639d7f..d84c408 100644 (file)
@@ -3662,7 +3662,7 @@ static const struct md_ops lmv_md_ops = {
 
 static int __init lmv_init(void)
 {
-       return class_register_type(&lmv_obd_ops, &lmv_md_ops, true, NULL,
+       return class_register_type(&lmv_obd_ops, &lmv_md_ops, true,
                                   LUSTRE_LMV_NAME, NULL);
 }
 
index c8ec185..1593a64 100644 (file)
@@ -2223,7 +2223,7 @@ static int __init lod_init(void)
        if (rc)
                return rc;
 
-       rc = class_register_type(&lod_obd_device_ops, NULL, true, NULL,
+       rc = class_register_type(&lod_obd_device_ops, NULL, true,
                                 LUSTRE_LOD_NAME, &lod_device_type);
        if (rc) {
                lu_kmem_fini(lod_caches);
index 1d2fe34..e8c8301 100644 (file)
@@ -1372,7 +1372,7 @@ static int __init lov_init(void)
                 return -ENOMEM;
         }
 
-       rc = class_register_type(&lov_obd_ops, NULL, true, NULL,
+       rc = class_register_type(&lov_obd_ops, NULL, true,
                                 LUSTRE_LOV_NAME, &lov_device_type);
         if (rc) {
                kmem_cache_destroy(lov_oinfo_slab);
index 52274be..a97026b 100644 (file)
@@ -2951,7 +2951,7 @@ static int __init mdc_init(void)
                goto out_dev;
        }
 
-       rc = class_register_type(&mdc_obd_ops, &mdc_md_ops, true, NULL,
+       rc = class_register_type(&mdc_obd_ops, &mdc_md_ops, true,
                                 LUSTRE_MDC_NAME, &mdc_device_type);
        if (rc)
                goto out_class;
index 14d812a..1a258e1 100644 (file)
@@ -2021,7 +2021,7 @@ static int __init mdd_init(void)
        changelog_orig_logops = llog_common_cat_ops;
        changelog_orig_logops.lop_write_rec = mdd_changelog_write_rec;
 
-       rc = class_register_type(&mdd_obd_device_ops, NULL, false, NULL,
+       rc = class_register_type(&mdd_obd_device_ops, NULL, false,
                                 LUSTRE_MDD_NAME, &mdd_device_type);
        if (rc)
                lu_kmem_fini(mdd_caches);
index 598aec3..87d7afe 100644 (file)
@@ -7400,7 +7400,7 @@ static int __init mdt_init(void)
        if (rc)
                GOTO(lu_fini, rc);
 
-       rc = class_register_type(&mdt_obd_device_ops, NULL, true, NULL,
+       rc = class_register_type(&mdt_obd_device_ops, NULL, true,
                                 LUSTRE_MDT_NAME, &mdt_device_type);
        if (rc)
                GOTO(mds_fini, rc);
index 1c06518..025c0da 100644 (file)
@@ -684,7 +684,7 @@ static const struct obd_ops mds_obd_device_ops = {
 
 int mds_mod_init(void)
 {
-       return class_register_type(&mds_obd_device_ops, NULL, false, NULL,
+       return class_register_type(&mds_obd_device_ops, NULL, false,
                                   LUSTRE_MDS_NAME, &mds_device_type);
 }
 
index 4aee4ff..dd51f8f 100644 (file)
@@ -2279,7 +2279,7 @@ static const struct obd_ops mgc_obd_ops = {
 
 static int __init mgc_init(void)
 {
-       return class_register_type(&mgc_obd_ops, NULL, false, NULL,
+       return class_register_type(&mgc_obd_ops, NULL, false,
                                   LUSTRE_MGC_NAME, NULL);
 }
 
index b5ddf09..26af684 100644 (file)
@@ -1727,7 +1727,7 @@ static const struct obd_ops mgs_obd_device_ops = {
 
 static int __init mgs_init(void)
 {
-       return class_register_type(&mgs_obd_device_ops, NULL, true, NULL,
+       return class_register_type(&mgs_obd_device_ops, NULL, true,
                                   LUSTRE_MGS_NAME, &mgs_device_type);
 }
 
index f85dfd3..45310fb 100644 (file)
@@ -223,7 +223,7 @@ EXPORT_SYMBOL(class_add_symlinks);
 
 int class_register_type(const struct obd_ops *dt_ops,
                        const struct md_ops *md_ops,
-                       bool enable_proc, struct ldebugfs_vars *vars,
+                       bool enable_proc,
                        const char *name, struct lu_device_type *ldt)
 {
        struct obd_type *type;
@@ -278,7 +278,6 @@ dir_exist:
        }
 #endif
        type->typ_debugfs_entry = debugfs_create_dir(name, debugfs_lustre_root);
-       ldebugfs_add_vars(type->typ_debugfs_entry, vars, type);
 
        rc = kobject_add(&type->typ_kobj, &lustre_kset->kobj, "%s", name);
        if (rc)
index cf9403f..e9b7dcd 100644 (file)
@@ -2270,7 +2270,7 @@ static const struct obd_ops llog_obd_ops = {
 
 static int __init llog_test_init(void)
 {
-       return class_register_type(&llog_obd_ops, NULL, false, NULL,
+       return class_register_type(&llog_obd_ops, NULL, false,
                                   "llog_test", NULL);
 }
 
index 5405066..a5bfd7a 100644 (file)
@@ -3117,7 +3117,7 @@ static int __init obdecho_init(void)
        if (rc != 0)
                goto failed_0;
 
-       rc = class_register_type(&echo_obd_ops, NULL, true, NULL,
+       rc = class_register_type(&echo_obd_ops, NULL, true,
                                 LUSTRE_ECHO_NAME, &echo_srv_type);
        if (rc != 0)
                goto failed_1;
@@ -3126,7 +3126,7 @@ static int __init obdecho_init(void)
        rc = lu_kmem_init(echo_caches);
        if (rc == 0) {
                rc = class_register_type(&echo_client_obd_ops, NULL, false,
-                                        NULL, LUSTRE_ECHO_CLIENT_NAME,
+                                        LUSTRE_ECHO_CLIENT_NAME,
                                         &echo_device_type);
                if (rc)
                        lu_kmem_fini(echo_caches);
index 63c6d1e..b4121e7 100644 (file)
@@ -3266,7 +3266,7 @@ static int __init ofd_init(void)
        if (rc)
                goto out_caches;
 
-       rc = class_register_type(&ofd_obd_ops, NULL, true, NULL,
+       rc = class_register_type(&ofd_obd_ops, NULL, true,
                                 LUSTRE_OST_NAME, &ofd_device_type);
        if (rc)
                goto out_ofd_access_log;
index bea61cd..14feba0 100644 (file)
@@ -3652,7 +3652,7 @@ static int __init osc_init(void)
        if (rc)
                RETURN(rc);
 
-       rc = class_register_type(&osc_obd_ops, NULL, true, NULL,
+       rc = class_register_type(&osc_obd_ops, NULL, true,
                                 LUSTRE_OSC_NAME, &osc_device_type);
        if (rc)
                GOTO(out_kmem, rc);
index 86054ff..8a910e7 100644 (file)
@@ -8369,7 +8369,7 @@ static int __init osd_init(void)
                (void *)kallsyms_lookup_name("security_file_alloc");
 #endif
 
-       rc = class_register_type(&osd_obd_device_ops, NULL, true, NULL,
+       rc = class_register_type(&osd_obd_device_ops, NULL, true,
                                 LUSTRE_OSD_LDISKFS_NAME, &osd_device_type);
        if (rc) {
                lu_kmem_fini(ldiskfs_caches);
index 7a8bc16..fe9ebc7 100644 (file)
@@ -1647,7 +1647,7 @@ static int __init osd_init(void)
        if (rc)
                return rc;
 
-       rc = class_register_type(&osd_obd_device_ops, NULL, true, NULL,
+       rc = class_register_type(&osd_obd_device_ops, NULL, true,
                                 LUSTRE_OSD_ZFS_NAME, &osd_device_type);
        if (rc)
                lu_kmem_fini(osd_caches);
index c5b5401..0690c30 100644 (file)
@@ -1901,14 +1901,14 @@ static int __init osp_init(void)
        if (rc)
                return rc;
 
-       rc = class_register_type(&osp_obd_device_ops, NULL, false, NULL,
+       rc = class_register_type(&osp_obd_device_ops, NULL, false,
                                 LUSTRE_OSP_NAME, &osp_device_type);
        if (rc != 0) {
                lu_kmem_fini(osp_caches);
                return rc;
        }
 
-       rc = class_register_type(&lwp_obd_device_ops, NULL, false, NULL,
+       rc = class_register_type(&lwp_obd_device_ops, NULL, false,
                                 LUSTRE_LWP_NAME, &lwp_device_type);
        if (rc != 0) {
                class_unregister_type(LUSTRE_OSP_NAME);
index 9d4b15b..e788210 100644 (file)
@@ -426,7 +426,7 @@ static int __init ost_init(void)
 
        ENTRY;
 
-       rc = class_register_type(&ost_obd_ops, NULL, false, NULL,
+       rc = class_register_type(&ost_obd_ops, NULL, false,
                                 LUSTRE_OSS_NAME, NULL);
 
        RETURN(rc);
index f785ac9..c810e83 100644 (file)
@@ -484,7 +484,7 @@ int qmt_glb_init(void)
        int rc;
        ENTRY;
 
-       rc = class_register_type(&qmt_obd_ops, NULL, true, NULL,
+       rc = class_register_type(&qmt_obd_ops, NULL, true,
                                 LUSTRE_QMT_NAME, &qmt_device_type);
        RETURN(rc);
 }