staging: lustre: obdclass: clean function declarations in obd_config.c and class_obd...
authorBaoyou Xie <baoyou.xie@linaro.org>
Sat, 17 Sep 2016 13:30:35 +0000 (21:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Sep 2016 21:36:52 +0000 (23:36 +0200)
We get 3 warnings when building kernel with W=1:

drivers/staging/lustre/lustre/obdclass/obd_mount.c:705:5: warning: no previous prototype for 'lustre_check_exclusion' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/obdclass/obd_mount.c:1226:5: warning: no previous prototype for 'lustre_register_fs' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/obdclass/obd_mount.c:1231:5: warning: no previous prototype for 'lustre_unregister_fs' [-Wmissing-prototypes]

In fact, the first function is declared in
drivers/staging/lustre/lustre/obdclass/obd_config.c,
and the other two functions are declared in
drivers/staging/lustre/lustre/obdclass/class_obd.c,
but all of these functions should be declared in
a header file, thus can be recognized in other file.

So this patch moves the declarations into
drivers/staging/lustre/lustre/include/obd_class.h.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/obd_class.h
drivers/staging/lustre/lustre/obdclass/class_obd.c
drivers/staging/lustre/lustre/obdclass/obd_config.c

index 324c70dc5466e34e9a3c51d524e9bffc84b51ea4..8e8df080a2d08a8ddd87567a6e82c3e9187081f8 100644 (file)
@@ -1696,6 +1696,9 @@ struct lwp_register_item {
 extern int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c);
 
 /* obd_mount.c */
+int lustre_unregister_fs(void);
+int lustre_register_fs(void);
+int lustre_check_exclusion(struct super_block *sb, char *svname);
 
 /* sysctl.c */
 int obd_sysctl_init(void);
index 710039a67972ef9519583ac370c321ce2c0758af..2293f6aabf02026c6ac32649db6a3a13f5b40d13 100644 (file)
@@ -450,8 +450,6 @@ static int __init obdclass_init(void)
 {
        int i, err;
 
-       int lustre_register_fs(void);
-
        LCONSOLE_INFO("Lustre: Build Version: " LUSTRE_VERSION_STRING "\n");
 
        spin_lock_init(&obd_types_lock);
@@ -518,8 +516,6 @@ static int __init obdclass_init(void)
 
 static void obdclass_exit(void)
 {
-       int lustre_unregister_fs(void);
-
        lustre_unregister_fs();
 
        misc_deregister(&obd_psdev);
index b7dcadbbc0e307bb4e54cf7573e7fc583d452d12..036f396e12562d3277a8e99ca2bc9d19418d2b54 100644 (file)
@@ -1047,8 +1047,6 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars,
 }
 EXPORT_SYMBOL(class_process_proc_param);
 
-extern int lustre_check_exclusion(struct super_block *sb, char *svname);
-
 /** Parse a configuration llog, doing various manipulations on them
  * for various reasons, (modifications for compatibility, skip obsolete
  * records, change uuids, etc), then class_process_config() resulting