lkml.org 
[lkml]   [2001]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] mtrr compile fix when no procfs/devfs
From
Date
arch/i386/kernel/mtrr.c does not compile when neither CONFIG_PROC_FS and
CONFIG_DEVFS_FS are set. mtrr has interfaces that are defined when
either are set.

The problem is that both devfs_handle and struct mtrr_fops are declared
inside the section of code for these interfaces, but are referenced
outside of them.

Note that yes, the devfs code does not need to be explicitly ifdef'ed
since it is all defined as nops. But then we would have to pull out the
devfs_handle typedef and mtrr_fops struct, which is just as pointless.

The attached is against 2.4.13-ac2. Alan, please apply.


diff -ur linux-2.4.13-ac2/arch/i386/kernel/mtrr.c linux/arch/i386/kernel/mtrr.c
--- linux-2.4.13-ac2/arch/i386/kernel/mtrr.c Fri Oct 26 15:48:14 2001
+++ linux/arch/i386/kernel/mtrr.c Sat Oct 27 00:04:09 2001
@@ -2249,9 +2249,11 @@
proc_root_mtrr->proc_fops = &mtrr_fops;
}
#endif
+#ifdef CONFIG_DEVFS_FS
devfs_handle = devfs_register (NULL, "cpu/mtrr", DEVFS_FL_DEFAULT, 0, 0,
S_IFREG | S_IRUGO | S_IWUSR,
&mtrr_fops, NULL);
+#endif
init_table ();
return 0;
} /* End Function mtrr_init */

Robert Love

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

\
 
 \ /
  Last update: 2005-03-22 13:11    [W:0.047 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site