[PATCH] staging: lustre: clean function declaration in super25.c up

2016-09-17 Thread Baoyou Xie
We get 1 warning when building kernel with W=1:
drivers/staging/lustre/lnet/selftest/conctl.c:804:1: warning: no previous 
prototype for 'lstcon_ioctl_entry' [-Wmissing-prototypes]

In fact, this function is declared in
drivers/staging/lustre/lustre/llite/super25.c, but should be
moved into a header file, thus can be recognized in other file.

So this patch moves the declaration into
drivers/staging/lustre/lnet/selftest/console.h

Signed-off-by: Baoyou Xie 
---
 drivers/staging/lustre/lnet/selftest/console.c | 2 --
 drivers/staging/lustre/lnet/selftest/console.h | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lnet/selftest/console.c 
b/drivers/staging/lustre/lnet/selftest/console.c
index 4c33621..a0fcbf3 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -1993,8 +1993,6 @@ static void lstcon_init_acceptor_service(void)
lstcon_acceptor_service.sv_wi_total = SFW_FRWK_WI_MAX;
 }
 
-extern int lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr);
-
 static DECLARE_IOCTL_HANDLER(lstcon_ioctl_handler, lstcon_ioctl_entry);
 
 /* initialize console */
diff --git a/drivers/staging/lustre/lnet/selftest/console.h 
b/drivers/staging/lustre/lnet/selftest/console.h
index 78b1477..78388a6 100644
--- a/drivers/staging/lustre/lnet/selftest/console.h
+++ b/drivers/staging/lustre/lnet/selftest/console.h
@@ -184,6 +184,7 @@ lstcon_id2hash(lnet_process_id_t id, struct list_head *hash)
return &hash[idx];
 }
 
+int lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr);
 int lstcon_console_init(void);
 int lstcon_console_fini(void);
 int lstcon_session_match(lst_sid_t sid);
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging/lustre: clean function declaration in super25.c up

2016-09-17 Thread Baoyou Xie
We get 1 warning when building kernel with W=1:
drivers/staging/lustre/lustre/obdclass/obd_config.c:719:6: warning: no previous 
prototype for 'lustre_register_client_process_config' [-Wmissing-prototypes]

In fact, this function is declared in
drivers/staging/lustre/lustre/llite/super25.c, but should be
moved into a header file, thus can be recognized in other file.

So this patch moves the declaration into
drivers/staging/lustre/lustre/include/lprocfs_status.h.

Signed-off-by: Baoyou Xie 
---
 drivers/staging/lustre/lustre/include/lprocfs_status.h | 3 +++
 drivers/staging/lustre/lustre/llite/super25.c  | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h 
b/drivers/staging/lustre/lustre/include/lprocfs_status.h
index ff35e63..6768ecc 100644
--- a/drivers/staging/lustre/lustre/include/lprocfs_status.h
+++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h
@@ -363,6 +363,9 @@ static inline void s2dhms(struct dhms *ts, time64_t secs64)
 #define JOBSTATS_PROCNAME_UID  "procname_uid"
 #define JOBSTATS_NODELOCAL "nodelocal"
 
+/* obd_config.c */
+void lustre_register_client_process_config(int (*cpc)(struct lustre_cfg 
*lcfg));
+
 int lprocfs_write_frac_helper(const char __user *buffer,
  unsigned long count, int *val, int mult);
 int lprocfs_read_frac_helper(char *buffer, unsigned long count,
diff --git a/drivers/staging/lustre/lustre/llite/super25.c 
b/drivers/staging/lustre/lustre/llite/super25.c
index 883084e..24c79c2 100644
--- a/drivers/staging/lustre/lustre/llite/super25.c
+++ b/drivers/staging/lustre/lustre/llite/super25.c
@@ -83,8 +83,6 @@ struct super_operations lustre_super_operations = {
 };
 MODULE_ALIAS_FS("lustre");
 
-void lustre_register_client_process_config(int (*cpc)(struct lustre_cfg 
*lcfg));
-
 static int __init lustre_init(void)
 {
lnet_process_id_t lnet_id;
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel