From 6d4acf1be59d087cec2fd1d4384b5a725374dfbc Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Fri, 8 Oct 2010 10:15:32 -0400 Subject: [PATCH] b=23685 don't define unused variables When CONFIG_SYSCTL is not defined in the kernel config, a couple of variables are left unused, yet still defined. i=Dmitry Zogin i=Andrew Perepechko --- libcfs/libcfs/linux/linux-proc.c | 4 +++- lustre/obdclass/linux/linux-sysctl.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libcfs/libcfs/linux/linux-proc.c b/libcfs/libcfs/linux/linux-proc.c index 5c5af72..220c671 100644 --- a/libcfs/libcfs/linux/linux-proc.c +++ b/libcfs/libcfs/linux/linux-proc.c @@ -76,7 +76,9 @@ #include #include "tracefile.h" +#ifdef CONFIG_SYSCTL static cfs_sysctl_table_header_t *lnet_table_header = NULL; +#endif extern char lnet_upcall[1024]; /** * The path of debug log dump upcall script. @@ -491,6 +493,7 @@ static cfs_sysctl_table_t lnet_table[] = { {0} }; +#ifdef CONFIG_SYSCTL static cfs_sysctl_table_t top_table[] = { { .ctl_name = CTL_LNET, @@ -507,7 +510,6 @@ static cfs_sysctl_table_t top_table[] = { int insert_proc(void) { -#ifdef CONFIG_SYSCTL if (lnet_table_header == NULL) lnet_table_header = cfs_register_sysctl_table(top_table, 0); #endif diff --git a/lustre/obdclass/linux/linux-sysctl.c b/lustre/obdclass/linux/linux-sysctl.c index 4f10cdb..dc3b1fb 100644 --- a/lustre/obdclass/linux/linux-sysctl.c +++ b/lustre/obdclass/linux/linux-sysctl.c @@ -54,7 +54,9 @@ #include #include +#ifdef CONFIG_SYSCTL cfs_sysctl_table_header_t *obd_table_header = NULL; +#endif #ifndef HAVE_SYSCTL_UNNUMBERED @@ -322,6 +324,7 @@ int LL_PROC_PROTO(proc_at_history) return ll_proc_dointvec(table, write, filp, buffer, lenp, ppos); } +#ifdef CONFIG_SYSCTL static cfs_sysctl_table_t obd_table[] = { { .ctl_name = OBD_FAIL_LOC, @@ -483,6 +486,7 @@ static cfs_sysctl_table_t parent_table[] = { }, {0} }; +#endif void obd_sysctl_init (void) { -- 1.8.3.1