From: Tonghao Zhang Date: Thu, 14 Dec 2017 13:51:59 +0000 (-0800) Subject: sock: Hide unused variable when !CONFIG_PROC_FS. X-Git-Tag: v4.16-rc1~123^2~337 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=398b841e4ad69a822f615442b5ea4ca767330a3b;p=thirdparty%2Fkernel%2Fstable.git sock: Hide unused variable when !CONFIG_PROC_FS. When CONFIG_PROC_FS is disabled, we will not use the prot_inuse counter. This adds an #ifdef to hide the variable definition in that case. This is not a bugfix. But we can save bytes when there are many network namespace. Cc: Pavel Emelyanov Signed-off-by: Martin Zhang Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller --- diff --git a/include/net/netns/core.h b/include/net/netns/core.h index a5e8a66c57b45..36c2d998a43c0 100644 --- a/include/net/netns/core.h +++ b/include/net/netns/core.h @@ -13,8 +13,8 @@ struct netns_core { #ifdef CONFIG_PROC_FS int __percpu *sock_inuse; -#endif struct prot_inuse __percpu *prot_inuse; +#endif }; #endif