linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lockd: avoid warning when CONFIG_SYSCTL undefined
@ 2014-05-01 21:15 Kees Cook
  2014-05-04 12:01 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2014-05-01 21:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Trond Myklebust, J. Bruce Fields, linux-nfs

When building without CONFIG_SYSCTL, the compiler saw an unused
label. This moves the label into the #ifdef it is used under.

fs/lockd/svc.c: In function ‘init_nlm’:
fs/lockd/svc.c:626:1: warning: label ‘err_sysctl’ defined but not used [-Wunused-label]

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 fs/lockd/svc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 6bf06a07f3e0..2b431f7266c3 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -622,8 +622,8 @@ static int __init init_nlm(void)
 err_pernet:
 #ifdef CONFIG_SYSCTL
 	unregister_sysctl_table(nlm_sysctl_table);
-#endif
 err_sysctl:
+#endif
 	return err;
 }
 
-- 
1.7.9.5


-- 
Kees Cook
Chrome OS Security

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] lockd: avoid warning when CONFIG_SYSCTL undefined
  2014-05-01 21:15 [PATCH] lockd: avoid warning when CONFIG_SYSCTL undefined Kees Cook
@ 2014-05-04 12:01 ` J. Bruce Fields
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2014-05-04 12:01 UTC (permalink / raw)
  To: Kees Cook; +Cc: linux-kernel, Andrew Morton, Trond Myklebust, linux-nfs

On Thu, May 01, 2014 at 02:15:02PM -0700, Kees Cook wrote:
> When building without CONFIG_SYSCTL, the compiler saw an unused
> label. This moves the label into the #ifdef it is used under.

Thanks, applying.

--b.

> 
> fs/lockd/svc.c: In function ‘init_nlm’:
> fs/lockd/svc.c:626:1: warning: label ‘err_sysctl’ defined but not used [-Wunused-label]
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
>  fs/lockd/svc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
> index 6bf06a07f3e0..2b431f7266c3 100644
> --- a/fs/lockd/svc.c
> +++ b/fs/lockd/svc.c
> @@ -622,8 +622,8 @@ static int __init init_nlm(void)
>  err_pernet:
>  #ifdef CONFIG_SYSCTL
>  	unregister_sysctl_table(nlm_sysctl_table);
> -#endif
>  err_sysctl:
> +#endif
>  	return err;
>  }
>  
> -- 
> 1.7.9.5
> 
> 
> -- 
> Kees Cook
> Chrome OS Security

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-04 12:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-01 21:15 [PATCH] lockd: avoid warning when CONFIG_SYSCTL undefined Kees Cook
2014-05-04 12:01 ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).