Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1263541 > unrolled thread

[PATCH] staging: lustre: lnet: selftest: Move extern declarations to headers

Started byAmitoj Kaur Chawla <amitoj1606@gmail.com>
First post2015-11-05 21:40 +0100
Last post2015-11-07 03:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: lustre: lnet: selftest: Move extern declarations to  headers Amitoj Kaur Chawla <amitoj1606@gmail.com> - 2015-11-05 21:40 +0100
    Re: [PATCH] staging: lustre: lnet: selftest: Move extern  declarations to headers Greg KH <gregkh@linuxfoundation.org> - 2015-11-07 03:50 +0100

#1263541 — [PATCH] staging: lustre: lnet: selftest: Move extern declarations to headers

FromAmitoj Kaur Chawla <amitoj1606@gmail.com>
Date2015-11-05 21:40 +0100
Subject[PATCH] staging: lustre: lnet: selftest: Move extern declarations to headers
Message-ID<qrzua-30u-3@gated-at.bofh.it>
This patch moves extern declarations to respective header files.

This patch also removes extern keyword from function declarations
since functions have the extern specifier by default.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
 drivers/staging/lustre/lnet/selftest/console.c   |  4 ----
 drivers/staging/lustre/lnet/selftest/console.h   |  2 ++
 drivers/staging/lustre/lnet/selftest/framework.c | 11 -----------
 drivers/staging/lustre/lnet/selftest/module.c    |  3 ---
 drivers/staging/lustre/lnet/selftest/selftest.h  | 13 +++++++++++++
 5 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c
index 024aaee..ab9906f 100644
--- a/drivers/staging/lustre/lnet/selftest/console.c
+++ b/drivers/staging/lustre/lnet/selftest/console.c
@@ -1698,8 +1698,6 @@ lstcon_new_session_id(lst_sid_t *sid)
 	sid->ses_stamp = cfs_time_current();
 }
 
-extern srpc_service_t lstcon_acceptor_service;
-
 int
 lstcon_session_new(char *name, int key, unsigned feats,
 		   int timeout, int force, lst_sid_t *sid_up)
@@ -1984,8 +1982,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_data *data);
-
 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 acd1312..fe1974a 100644
--- a/drivers/staging/lustre/lnet/selftest/console.h
+++ b/drivers/staging/lustre/lnet/selftest/console.h
@@ -169,6 +169,8 @@ typedef struct {
 } lstcon_session_t; /* session descriptor */
 
 extern lstcon_session_t	 console_session;
+extern srpc_service_t lstcon_acceptor_service;
+int lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_data *data);
 
 static inline lstcon_trans_stat_t *
 lstcon_trans_stat(void)
diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c
index 177beaf..34072d0 100644
--- a/drivers/staging/lustre/lnet/selftest/framework.c
+++ b/drivers/staging/lustre/lnet/selftest/framework.c
@@ -1623,17 +1623,6 @@ static srpc_service_t sfw_services[] = {
 	}
 };
 
-extern sfw_test_client_ops_t ping_test_client;
-extern srpc_service_t	ping_test_service;
-extern void ping_init_test_client(void);
-extern void ping_init_test_service(void);
-
-extern sfw_test_client_ops_t brw_test_client;
-extern srpc_service_t	brw_test_service;
-extern void brw_init_test_client(void);
-extern void brw_init_test_service(void);
-
-
 int
 sfw_startup(void)
 {
diff --git a/drivers/staging/lustre/lnet/selftest/module.c b/drivers/staging/lustre/lnet/selftest/module.c
index 09b8f46..c2a8ee5 100644
--- a/drivers/staging/lustre/lnet/selftest/module.c
+++ b/drivers/staging/lustre/lnet/selftest/module.c
@@ -47,9 +47,6 @@ enum {
 	LST_INIT_CONSOLE
 };
 
-extern int lstcon_console_init(void);
-extern int lstcon_console_fini(void);
-
 static int lst_init_step = LST_INIT_NONE;
 
 struct cfs_wi_sched *lst_sched_serial;
diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h b/drivers/staging/lustre/lnet/selftest/selftest.h
index 4832253..7e6a234 100644
--- a/drivers/staging/lustre/lnet/selftest/selftest.h
+++ b/drivers/staging/lustre/lnet/selftest/selftest.h
@@ -452,6 +452,19 @@ void srpc_service_remove_buffers(srpc_service_t *sv, int nbuffer);
 void srpc_get_counters(srpc_counters_t *cnt);
 void srpc_set_counters(const srpc_counters_t *cnt);
 
+int lstcon_console_init(void);
+int lstcon_console_fini(void);
+
+extern sfw_test_client_ops_t ping_test_client;
+extern srpc_service_t	ping_test_service;
+void ping_init_test_client(void);
+void ping_init_test_service(void);
+
+extern sfw_test_client_ops_t brw_test_client;
+extern srpc_service_t	brw_test_service;
+void brw_init_test_client(void);
+void brw_init_test_service(void);
+
 extern struct cfs_wi_sched *lst_sched_serial;
 extern struct cfs_wi_sched **lst_sched_test;
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1264709 — Re: [PATCH] staging: lustre: lnet: selftest: Move extern declarations to headers

FromGreg KH <gregkh@linuxfoundation.org>
Date2015-11-07 03:50 +0100
SubjectRe: [PATCH] staging: lustre: lnet: selftest: Move extern declarations to headers
Message-ID<qs1JM-4zz-17@gated-at.bofh.it>
In reply to#1263541
On Fri, Nov 06, 2015 at 02:04:21AM +0530, Amitoj Kaur Chawla wrote:
> This patch moves extern declarations to respective header files.
> 
> This patch also removes extern keyword from function declarations
> since functions have the extern specifier by default.
> 
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>

Doesn't apply to my staging-testing branch anymore due to patches send
before yours :(

Please refresh it and resend.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web