From: Mr NeilBrown Date: Tue, 5 Nov 2019 03:04:32 +0000 (+1100) Subject: LU-9679 modules: declare zero-arg functions correctly X-Git-Tag: 2.13.51~160 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=f575372b52833028968b05d16a910372e2d5d994 LU-9679 modules: declare zero-arg functions correctly 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 Change-Id: I327c57131c4b5008660844a8436fa27df53c16c7 Reviewed-on: https://review.whamcloud.com/36672 Tested-by: jenkins Reviewed-by: Andreas Dilger Reviewed-by: Chris Horn Reviewed-by: James Simmons Tested-by: Maloo --- diff --git a/lnet/klnds/gnilnd/gnilnd_modparams.c b/lnet/klnds/gnilnd/gnilnd_modparams.c index bdf2b97..13db614 100644 --- a/lnet/klnds/gnilnd/gnilnd_modparams.c +++ b/lnet/klnds/gnilnd/gnilnd_modparams.c @@ -265,7 +265,7 @@ kgn_tunables_t kgnilnd_tunables = { }; int -kgnilnd_tunables_init() +kgnilnd_tunables_init(void) { int rc = 0; diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 7d50dcf..fb4b7fb 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -2743,7 +2743,7 @@ EXPORT_SYMBOL(LNetNIInit); * \return always 0 for current implementation. */ int -LNetNIFini() +LNetNIFini(void) { mutex_lock(&the_lnet.ln_api_mutex); diff --git a/lnet/selftest/console.c b/lnet/selftest/console.c index 128c9a3..2428789 100644 --- a/lnet/selftest/console.c +++ b/lnet/selftest/console.c @@ -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; diff --git a/lustre/obdclass/cl_object.c b/lustre/obdclass/cl_object.c index fe4dac9..7d14a6b 100644 --- a/lustre/obdclass/cl_object.c +++ b/lustre/obdclass/cl_object.c @@ -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; diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c index d7ef560..b479dc6 100644 --- a/lustre/ptlrpc/pinger.c +++ b/lustre/ptlrpc/pinger.c @@ -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);