[PATCH] staging: lustre: Move proc_*() functions inside #ifdef CONFIG_SYSCTL

From: Geert Uytterhoeven
Date: Thu Feb 12 2015 - 09:34:15 EST


If CONFIG_SYSCTL=n:

drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:84: warning: âproc_set_timeoutâ defined but not used
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:95: warning: âproc_memory_allocâ defined but not used
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:119: warning: âproc_pages_allocâ defined but not used
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:143: warning: âproc_mem_maxâ defined but not used
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:167: warning: âproc_pages_maxâ defined but not used
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:191: warning: âproc_max_dirty_pages_in_mbâ defined but not used
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c:232: warning: âproc_alloc_fail_rateâ defined but not used

Make the existing #ifdef CONFIG_SYSCTL cover all sysctl-related
functions to fix this.

Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
---
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c
index dd46e73581608bc6..c86598d52d53cc23 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c
@@ -79,6 +79,7 @@ enum {
};


+#ifdef CONFIG_SYSCTL
static int proc_set_timeout(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
@@ -258,7 +259,6 @@ static int proc_alloc_fail_rate(struct ctl_table *table, int write,
return rc;
}

-#ifdef CONFIG_SYSCTL
static struct ctl_table obd_table[] = {
{
.procname = "timeout",
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/