From: Arjan van de Ven <arjan@infradead.org>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
mingo@elte.hu, davej@redhat.com
Subject: Re: [PATCH] make /dev/kmem a config option
Date: Sun, 10 Feb 2008 16:42:05 -0800 [thread overview]
Message-ID: <20080210164205.3d8f6680@laptopd505.fenrus.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0802110111160.7915@fbirervta.pbzchgretzou.qr>
On Mon, 11 Feb 2008 01:13:09 +0100 (CET)
Jan Engelhardt <jengelh@computergmbh.de> wrote:
>
> On Feb 10 2008 15:55, Arjan van de Ven wrote:
> >+#ifdef CONFIG_DEVKMEM
> > /*
> > * This function reads the *virtual* memory as seen by the kernel.
> > */
> >@@ -585,6 +588,11 @@ static ssize_t write_kmem(struct file * file,
> >const char __user * buf,
> > *ppos = p;
> > return virtr + wrote;
> > }
> >+#else
> >+#define read_kmem NULL
> >+#define write_kmem NULL
> >+#define mmap_kmem NULL
> >+#endif
>
> Is the #else case needed? All kmem_fops uses seem #ifdef'ed out
> anyway, except kmem_fops itself. In other words,
>
> +#ifdef CONFIG_DEVKMEM
> static const struct file_operations kmem_fops = {
> ...
> }
> +#endif
>
> and do away with the three defines. No? :)
hmm I tried that first, and didn't work
but that wasn't on the final version of the patch so let me try again..
--
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
next prev parent reply other threads:[~2008-02-11 0:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-10 23:55 Arjan van de Ven
2008-02-11 0:13 ` Jan Engelhardt
2008-02-11 0:42 ` Arjan van de Ven [this message]
2008-02-11 1:05 ` Arjan van de Ven
2008-02-11 22:38 ` Andrew Morton
2008-02-12 4:03 ` Arjan van de Ven
2008-02-12 4:59 ` Andrew Morton
2008-02-12 5:16 ` Arjan van de Ven
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=20080210164205.3d8f6680@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=davej@redhat.com \
--cc=jengelh@computergmbh.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®