From: Mr NeilBrown Date: Wed, 15 Jul 2020 06:32:47 +0000 (+1000) Subject: LU-6142 lustre: remove module_vars arg to class_register_type() X-Git-Tag: 2.14.51~116 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=8d8e87a5ac7e9d072383019228270eb4681a597e LU-6142 lustre: remove module_vars arg to class_register_type() The module_vars arg to class_register_type() is always NULL. So it can be removed. Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: Ie8d7e79075ba068dec606cc9dfcc38a90e371e5b Reviewed-on: https://review.whamcloud.com/39383 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Shaun Tancheff Reviewed-by: James Simmons Reviewed-by: Andreas Dilger --- diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index 5c6e25e..8114658 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -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); diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index b639d7f..d84c408 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -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); } diff --git a/lustre/lod/lod_dev.c b/lustre/lod/lod_dev.c index c8ec185..1593a64 100644 --- a/lustre/lod/lod_dev.c +++ b/lustre/lod/lod_dev.c @@ -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); diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 1d2fe34..e8c8301 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -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); diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 52274be..a97026b 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -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; diff --git a/lustre/mdd/mdd_device.c b/lustre/mdd/mdd_device.c index 14d812a..1a258e1 100644 --- a/lustre/mdd/mdd_device.c +++ b/lustre/mdd/mdd_device.c @@ -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); diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 598aec3..87d7afe 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -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); diff --git a/lustre/mdt/mdt_mds.c b/lustre/mdt/mdt_mds.c index 1c06518..025c0da 100644 --- a/lustre/mdt/mdt_mds.c +++ b/lustre/mdt/mdt_mds.c @@ -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); } diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index 4aee4ff..dd51f8f 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -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); } diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c index b5ddf09..26af684 100644 --- a/lustre/mgs/mgs_handler.c +++ b/lustre/mgs/mgs_handler.c @@ -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); } diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index f85dfd3..45310fb 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -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) diff --git a/lustre/obdclass/llog_test.c b/lustre/obdclass/llog_test.c index cf9403f..e9b7dcd 100644 --- a/lustre/obdclass/llog_test.c +++ b/lustre/obdclass/llog_test.c @@ -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); } diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c index 5405066..a5bfd7a 100644 --- a/lustre/obdecho/echo_client.c +++ b/lustre/obdecho/echo_client.c @@ -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); diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c index 63c6d1e..b4121e7 100644 --- a/lustre/ofd/ofd_dev.c +++ b/lustre/ofd/ofd_dev.c @@ -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; diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index bea61cd..14feba0 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -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); diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 86054ff..8a910e7 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -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); diff --git a/lustre/osd-zfs/osd_handler.c b/lustre/osd-zfs/osd_handler.c index 7a8bc16..fe9ebc7 100644 --- a/lustre/osd-zfs/osd_handler.c +++ b/lustre/osd-zfs/osd_handler.c @@ -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); diff --git a/lustre/osp/osp_dev.c b/lustre/osp/osp_dev.c index c5b5401..0690c30 100644 --- a/lustre/osp/osp_dev.c +++ b/lustre/osp/osp_dev.c @@ -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); diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 9d4b15b..e788210 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -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); diff --git a/lustre/quota/qmt_dev.c b/lustre/quota/qmt_dev.c index f785ac9..c810e83 100644 --- a/lustre/quota/qmt_dev.c +++ b/lustre/quota/qmt_dev.c @@ -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); }