Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757056AbYBKAms (ORCPT ); Sun, 10 Feb 2008 19:42:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754847AbYBKAmk (ORCPT ); Sun, 10 Feb 2008 19:42:40 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:34070 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755399AbYBKAmj (ORCPT ); Sun, 10 Feb 2008 19:42:39 -0500 Date: Sun, 10 Feb 2008 16:42:05 -0800 From: Arjan van de Ven To: Jan Engelhardt 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 Message-ID: <20080210164205.3d8f6680@laptopd505.fenrus.org> In-Reply-To: References: <20080210155534.17fc6e5e@laptopd505.fenrus.org> Organization: Intel X-Mailer: Claws Mail 3.2.0 (GTK+ 2.12.3; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1296 Lines: 44 On Mon, 11 Feb 2008 01:13:09 +0100 (CET) Jan Engelhardt 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 -- 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/