[PATCH] tile: avoid a "defined but not used" warning in kernel/proc.c for tilegx

From: Chris Metcalf
Date: Tue Jun 14 2011 - 12:01:49 EST


This change increases the scope of an "#ifndef __tilegx__" so we don't
include the /proc/sys data structures if we're not going to create a
/proc/sys/tile entry, thus fixing the warning.

Signed-off-by: Chris Metcalf <cmetcalf@xxxxxxxxxx>
---
arch/tile/kernel/proc.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/tile/kernel/proc.c b/arch/tile/kernel/proc.c
index 62d8208..c5e3c67 100644
--- a/arch/tile/kernel/proc.c
+++ b/arch/tile/kernel/proc.c
@@ -107,11 +107,12 @@ static int __init proc_tile_init(void)

arch_initcall(proc_tile_init);

+#ifndef __tilegx__ /* FIXME: GX: no support for unaligned access yet */
+
/*
* Support /proc/sys/tile directory
*/

-#ifndef __tilegx__ /* FIXME: GX: no support for unaligned access yet */
static ctl_table unaligned_subtable[] = {
{
.procname = "enabled",
@@ -145,7 +146,6 @@ static ctl_table unaligned_table[] = {
},
{}
};
-#endif

static struct ctl_path tile_path[] = {
{ .procname = "tile" },
@@ -154,10 +154,10 @@ static struct ctl_path tile_path[] = {

static int __init proc_sys_tile_init(void)
{
-#ifndef __tilegx__ /* FIXME: GX: no support for unaligned access yet */
register_sysctl_paths(tile_path, unaligned_table);
-#endif
return 0;
}

arch_initcall(proc_sys_tile_init);
+
+#endif
--
1.6.5.2

--
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/