nfsd: Fix old-style function definition
diff mbox series

Message ID 1589198828-11226-1-git-send-email-mafeng.ma@huawei.com
State New
Headers show
Series
  • nfsd: Fix old-style function definition
Related show

Commit Message

Ma Feng May 11, 2020, 12:07 p.m. UTC
Fix warning:

fs/nfsd/nfssvc.c:604:6: warning: old-style function definition [-Wold-style-definition]
 bool i_am_nfsd()
      ^~~~~~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ma Feng <mafeng.ma@huawei.com>
---
 fs/nfsd/nfssvc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.6.2

Comments

J. Bruce Fields May 11, 2020, 1:58 p.m. UTC | #1
On Mon, May 11, 2020 at 08:07:08PM +0800, Ma Feng wrote:
> Fix warning:
> 
> fs/nfsd/nfssvc.c:604:6: warning: old-style function definition [-Wold-style-definition]
>  bool i_am_nfsd()

Applying for 5.8, thanks.--b.

>       ^~~~~~~~~
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Ma Feng <mafeng.ma@huawei.com>
> ---
>  fs/nfsd/nfssvc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
> index 4f588c0..b603dfc 100644
> --- a/fs/nfsd/nfssvc.c
> +++ b/fs/nfsd/nfssvc.c
> @@ -601,7 +601,7 @@ static const struct svc_serv_ops nfsd_thread_sv_ops = {
>  	.svo_module		= THIS_MODULE,
>  };
> 
> -bool i_am_nfsd()
> +bool i_am_nfsd(void)
>  {
>  	return kthread_func(current) == nfsd;
>  }
> --
> 2.6.2

Patch
diff mbox series

diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 4f588c0..b603dfc 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -601,7 +601,7 @@  static const struct svc_serv_ops nfsd_thread_sv_ops = {
 	.svo_module		= THIS_MODULE,
 };

-bool i_am_nfsd()
+bool i_am_nfsd(void)
 {
 	return kthread_func(current) == nfsd;
 }