Whamcloud - gitweb
LU-6142 lustre: remove module_vars arg to class_register_type()
authorMr NeilBrown <neilb@suse.de>
Fri, 8 Mar 2024 00:51:43 +0000 (16:51 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 9 Mar 2024 07:44:30 +0000 (07:44 +0000)
The module_vars arg to class_register_type() is always NULL.  So it
can be removed.

Lustre-change: https://review.whamcloud.com/39383
Lustre-commit: 8d8e87a5ac7e9d072383019228270eb4681a597e

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ie8d7e79075ba068dec606cc9dfcc38a90e371e5b
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54321
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
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 1fa0c04..dfd5d95 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 95061b8..d036457 100644 (file)
@@ -4089,7 +4089,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 c064f36..c3598d8 100644 (file)
@@ -2721,7 +2721,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 da5256a..209e081 100644 (file)
@@ -1400,7 +1400,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 8cd36e7..48957ad 100644 (file)
@@ -3030,7 +3030,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 6413f5a..b8dca7a 100644 (file)
@@ -2410,7 +2410,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 97a12e3..6c4f620 100644 (file)
@@ -7852,7 +7852,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 f1d7997..dbe6cfb 100644 (file)
@@ -2337,7 +2337,7 @@ MODULE_PARM_DESC(mgc_requeue_timeout_min, "Minimal requeue time to refresh logs"
 
 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 f3d8c9c..7e64ca3 100644 (file)
@@ -1733,7 +1733,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 245235b..2acedb3 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 ff41916..ebbdebb 100644 (file)
@@ -2345,7 +2345,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 2fc3faf..2bb4836 100644 (file)
@@ -2590,7 +2590,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;
@@ -2599,7 +2599,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 801eac8..9d5acd7 100644 (file)
@@ -3298,7 +3298,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 76f6a79..d34a618 100644 (file)
@@ -4088,7 +4088,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 c2c4895..3923b99 100644 (file)
@@ -9058,7 +9058,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_LDISKFS_NAME, &osd_device_type);
        if (rc) {
                lu_kmem_fini(ldiskfs_caches);
index 01b897e..66ae9ac 100644 (file)
@@ -1674,7 +1674,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 838545f..db34fba 100644 (file)
@@ -1881,14 +1881,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);
 }