LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@computergmbh.de>
To: Arjan van de Ven <arjan@infradead.org>
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: Mon, 11 Feb 2008 01:13:09 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0802110111160.7915@fbirervta.pbzchgretzou.qr> (raw)
In-Reply-To: <20080210155534.17fc6e5e@laptopd505.fenrus.org>


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? :)

  reply	other threads:[~2008-02-11  0:13 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 [this message]
2008-02-11  0:42   ` Arjan van de Ven
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=Pine.LNX.4.64.0802110111160.7915@fbirervta.pbzchgretzou.qr \
    --to=jengelh@computergmbh.de \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --subject='Re: [PATCH] make /dev/kmem a config option' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).