On 06-08-15 20:07, Shraddha Barke wrote:
This patch fixes "externs should be avoided in .c files"
warning as reported by checkpatch
Signed-off-by: Shraddha Barke <shraddha.6596(a)gmail.com>
NAK
All of
class_procfs_init()
class_procfs_clean()
lustre_register_fs()
lustre_unregister_fs()
are defined in other source files. To make them static here
ensures that the build will fail at link time. The proper
solution is to declare them in appropriate header files and
(if not already present) include those headers in class_obd.c.
I also don't see why the local variables of init_obdclass()
and cleanup_obdclass() need to be static.
Rgds,
Olaf
---
drivers/staging/lustre/lustre/obdclass/class_obd.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c
b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 20a7cd9..71651cb6 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -502,13 +502,13 @@ int obd_init_checks(void)
return ret;
}
-extern int class_procfs_init(void);
-extern int class_procfs_clean(void);
+static int class_procfs_init(void);
+static int class_procfs_clean(void);
static int __init init_obdclass(void)
{
- int i, err;
- int lustre_register_fs(void);
+ static int i, err;
+ static int lustre_register_fs(void);
for (i = CAPA_SITE_CLIENT; i < CAPA_SITE_MAX; i++)
INIT_LIST_HEAD(&capa_list[i]);
@@ -637,8 +637,8 @@ EXPORT_SYMBOL(obd_pages_max);
* ifdef to the end of the file to cover module and versioning goo.*/
static void cleanup_obdclass(void)
{
- int i;
- int lustre_unregister_fs(void);
+ static int i;
+ static int lustre_unregister_fs(void);
__u64 memory_leaked, pages_leaked;
__u64 memory_max, pages_max;
--
Olaf Weber SGI Phone: +31(0)30-6696796
Veldzigt 2b Fax: +31(0)30-6696799
Technical Lead 3454 PW de Meern Vnet: 955-6796
Storage Software The Netherlands Email: olaf(a)sgi.com