Whamcloud - gitweb
LU-9679 modules: declare zero-arg functions correctly 72/36672/2
authorMr NeilBrown <neilb@suse.de>
Tue, 5 Nov 2019 03:04:32 +0000 (14:04 +1100)
committerOleg Drokin <green@whamcloud.com>
Fri, 6 Dec 2019 01:03:46 +0000 (01:03 +0000)
Functions that don't take any arguments should be
declared
   return-type name(void)
rather than
   return-type name()

This patch only changes functions that are included in
kernel modules.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I327c57131c4b5008660844a8436fa27df53c16c7
Reviewed-on: https://review.whamcloud.com/36672
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/klnds/gnilnd/gnilnd_modparams.c
lnet/lnet/api-ni.c
lnet/selftest/console.c
lustre/obdclass/cl_object.c
lustre/ptlrpc/pinger.c

index bdf2b97..13db614 100644 (file)
@@ -265,7 +265,7 @@ kgn_tunables_t kgnilnd_tunables = {
 };
 
 int
-kgnilnd_tunables_init()
+kgnilnd_tunables_init(void)
 {
        int rc = 0;
 
index 7d50dcf..fb4b7fb 100644 (file)
@@ -2743,7 +2743,7 @@ EXPORT_SYMBOL(LNetNIInit);
  * \return always 0 for current implementation.
  */
 int
-LNetNIFini()
+LNetNIFini(void)
 {
        mutex_lock(&the_lnet.ln_api_mutex);
 
index 128c9a3..2428789 100644 (file)
@@ -1814,7 +1814,7 @@ lstcon_session_info(struct lst_sid __user *sid_up, int __user *key_up,
 }
 
 int
-lstcon_session_end()
+lstcon_session_end(void)
 {
        struct lstcon_rpc_trans *trans;
        struct lstcon_group *grp;
index fe4dac9..7d14a6b 100644 (file)
@@ -972,7 +972,7 @@ void cl_env_percpu_put(struct lu_env *env)
 }
 EXPORT_SYMBOL(cl_env_percpu_put);
 
-struct lu_env *cl_env_percpu_get()
+struct lu_env *cl_env_percpu_get(void)
 {
        struct cl_env *cle;
 
index d7ef560..b479dc6 100644 (file)
@@ -52,7 +52,7 @@ static struct list_head pinger_imports =
 static struct list_head timeout_list =
                LIST_HEAD_INIT(timeout_list);
 
-int ptlrpc_pinger_suppress_pings()
+int ptlrpc_pinger_suppress_pings(void)
 {
        return suppress_pings;
 }
@@ -538,7 +538,7 @@ int ptlrpc_pinger_remove_timeouts(void)
        return 0;
 }
 
-void ptlrpc_pinger_wake_up()
+void ptlrpc_pinger_wake_up(void)
 {
 #ifdef ENABLE_PINGER
        mod_delayed_work(pinger_wq, &ping_work, 0);