[PATCH] fix warning in ipc/ipc_sysctl.c

From: Ingo Molnar
Date: Mon Oct 20 2008 - 03:19:55 EST


fix this warning:

ipc/ipc_sysctl.c:39: warning: âipc_auto_callbackâ defined but not used

Move the already present #ifdef CONFIG_PROC_FS up by one function.

Also prepare get_ipc() for the !PROC_FS && !SYSCTL_SYSCALL case.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
ipc/ipc_sysctl.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 0dfebc5..010850a 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -18,6 +18,7 @@
#include <linux/msg.h>
#include "util.h"

+#if defined(CONFIG_PROC_FS) || defined(CONFIG_SYSCTL_SYSCALL)
static void *get_ipc(ctl_table *table)
{
char *which = table->data;
@@ -25,7 +26,9 @@ static void *get_ipc(ctl_table *table)
which = (which - (char *)&init_ipc_ns) + (char *)ipc_ns;
return which;
}
+#endif

+#ifdef CONFIG_PROC_FS
/*
* Routine that is called when the file "auto_msgmni" has successfully been
* written.
@@ -49,7 +52,6 @@ static void ipc_auto_callback(int val)
}
}

-#ifdef CONFIG_PROC_FS
static int proc_ipc_dointvec(ctl_table *table, int write, struct file *filp,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
--
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/