From: Greg Kroah-Hartman Date: Sun, 4 Aug 2013 00:16:25 +0000 (+0800) Subject: staging: lustre: remove cfs_module() macro X-Git-Tag: firefly_0821_release~176^2~5471^2~330 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6960736c01732ad952aa6c513976fa0b95166873;p=firefly-linux-kernel-4.4.55.git staging: lustre: remove cfs_module() macro Open code the module_init/module_exit lines, and also use MODULE_VERSION, as it seems that was intended, but just never hooked up at all. Cc: Peng Tao Cc: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h index 722d90cfef16..64e75c7bfc43 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h @@ -107,15 +107,6 @@ typedef struct task_struct task_t; current->journal_info = journal_info; \ } while(0) -/* Module interfaces */ -#define cfs_module(name, version, init, fini) \ - module_init(init); \ - module_exit(fini) - -/* - * Signal - */ - /* * Timer */ diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c index d7b01e78ed7a..1f367638eec4 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c @@ -2898,5 +2898,7 @@ ksocknal_module_init (void) MODULE_AUTHOR("Sun Microsystems, Inc. "); MODULE_DESCRIPTION("Kernel TCP Socket LND v3.0.0"); MODULE_LICENSE("GPL"); +MODULE_VERSION("3.0.0"); -cfs_module(ksocknal, "3.0.0", ksocknal_module_init, ksocknal_module_fini); +module_init(ksocknal_module_init); +module_exit(ksocknal_module_fini); diff --git a/drivers/staging/lustre/lnet/lnet/module.c b/drivers/staging/lustre/lnet/lnet/module.c index 8679b8d1b2f7..afb81755cbad 100644 --- a/drivers/staging/lustre/lnet/lnet/module.c +++ b/drivers/staging/lustre/lnet/lnet/module.c @@ -149,5 +149,7 @@ fini_lnet(void) MODULE_AUTHOR("Peter J. Braam "); MODULE_DESCRIPTION("Portals v3.1"); MODULE_LICENSE("GPL"); +MODULE_VERSION("1.0.0"); -cfs_module(lnet, "1.0.0", init_lnet, fini_lnet); +module_init(init_lnet); +module_exit(fini_lnet); diff --git a/drivers/staging/lustre/lnet/selftest/module.c b/drivers/staging/lustre/lnet/selftest/module.c index 5257e5630a0e..6dd4309dc5ea 100644 --- a/drivers/staging/lustre/lnet/selftest/module.c +++ b/drivers/staging/lustre/lnet/selftest/module.c @@ -165,5 +165,7 @@ error: MODULE_DESCRIPTION("LNet Selftest"); MODULE_LICENSE("GPL"); +MODULE_VERSION("0.9.0"); -cfs_module(lnet, "0.9.0", lnet_selftest_init, lnet_selftest_fini); +module_init(lnet_selftest_init); +module_exit(lnet_selftest_fini); diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c b/drivers/staging/lustre/lustre/fid/fid_request.c index dc3948e4be39..66007b57018b 100644 --- a/drivers/staging/lustre/lustre/fid/fid_request.c +++ b/drivers/staging/lustre/lustre/fid/fid_request.c @@ -564,5 +564,7 @@ static void __exit fid_mod_exit(void) MODULE_AUTHOR("Sun Microsystems, Inc. "); MODULE_DESCRIPTION("Lustre FID Module"); MODULE_LICENSE("GPL"); +MODULE_VERSION("0.1.0"); -cfs_module(fid, "0.1.0", fid_mod_init, fid_mod_exit); +module_init(fid_mod_init); +module_exit(fid_mod_exit); diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c index 432b55d3216c..f3108c7f818e 100644 --- a/drivers/staging/lustre/lustre/libcfs/module.c +++ b/drivers/staging/lustre/lustre/libcfs/module.c @@ -491,4 +491,6 @@ static void exit_libcfs_module(void) libcfs_arch_cleanup(); } -cfs_module(libcfs, "1.0.0", init_libcfs_module, exit_libcfs_module); +MODULE_VERSION("1.0.0"); +module_init(init_libcfs_module); +module_exit(exit_libcfs_module); diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index a8c709e26a92..71f5ef16e83d 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -2870,5 +2870,7 @@ static void /*__exit*/ lov_exit(void) MODULE_AUTHOR("Sun Microsystems, Inc. "); MODULE_DESCRIPTION("Lustre Logical Object Volume OBD driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(LUSTRE_VERSION_STRING); -cfs_module(lov, LUSTRE_VERSION_STRING, lov_init, lov_exit); +module_init(lov_init); +module_exit(lov_exit); diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c b/drivers/staging/lustre/lustre/obdclass/class_obd.c index 44af41278a03..b1024a6d37dd 100644 --- a/drivers/staging/lustre/lustre/obdclass/class_obd.c +++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c @@ -680,5 +680,7 @@ static void cleanup_obdclass(void) MODULE_AUTHOR("Sun Microsystems, Inc. "); MODULE_DESCRIPTION("Lustre Class Driver Build Version: " BUILD_VERSION); MODULE_LICENSE("GPL"); +MODULE_VERSION(LUSTRE_VERSION_STRING); -cfs_module(obdclass, LUSTRE_VERSION_STRING, init_obdclass, cleanup_obdclass); +module_init(init_obdclass); +module_exit(cleanup_obdclass); diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c index 25151b13fefd..2644edf438c1 100644 --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c @@ -3163,7 +3163,9 @@ static void /*__exit*/ obdecho_exit(void) MODULE_AUTHOR("Sun Microsystems, Inc. "); MODULE_DESCRIPTION("Lustre Testing Echo OBD driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(LUSTRE_VERSION_STRING); -cfs_module(obdecho, LUSTRE_VERSION_STRING, obdecho_init, obdecho_exit); +module_init(obdecho_init); +module_exit(obdecho_exit); /** @} echo_client */ diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c index 611678c407a6..ee6707a5ea9d 100644 --- a/drivers/staging/lustre/lustre/osc/osc_request.c +++ b/drivers/staging/lustre/lustre/osc/osc_request.c @@ -3656,5 +3656,7 @@ static void /*__exit*/ osc_exit(void) MODULE_AUTHOR("Sun Microsystems, Inc. "); MODULE_DESCRIPTION("Lustre Object Storage Client (OSC)"); MODULE_LICENSE("GPL"); +MODULE_VERSION(LUSTRE_VERSION_STRING); -cfs_module(osc, LUSTRE_VERSION_STRING, osc_init, osc_exit); +module_init(osc_init); +module_exit(osc_exit); diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c index d26fce802b66..419e634854df 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c @@ -149,5 +149,7 @@ static void __exit ptlrpc_exit(void) MODULE_AUTHOR("Sun Microsystems, Inc. "); MODULE_DESCRIPTION("Lustre Request Processor and Lock Management"); MODULE_LICENSE("GPL"); +MODULE_VERSION("1.0.0"); -cfs_module(ptlrpc, "1.0.0", ptlrpc_init, ptlrpc_exit); +module_init(ptlrpc_init); +module_exit(ptlrpc_exit);