From: Robert Love <rml@tech9.net>
To: alan@lxorguk.ukuu.org.uk
Cc: rgooch@atnf.csiro.au, linux-kernel@vger.kernel.org
Subject: [PATCH] mtrr compile fix when no procfs/devfs
Date: 27 Oct 2001 00:18:51 -0400 [thread overview]
Message-ID: <1004156333.981.42.camel@phantasy> (raw)
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
reply other threads:[~2001-10-27 4:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1004156333.981.42.camel@phantasy \
--to=rml@tech9.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=rgooch@atnf.csiro.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox