linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Badari Pulavarty <pbadari@gmail.com>
Cc: Mingming Cao <cmm@us.ibm.com>,
	markn@au1.ibm.com, ext4 <linux-ext4@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Amit K. Arora" <aarora@linux.vnet.ibm.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [patch 1/2] add init_ext4_proc() stub for when CONFIG_PROC_FS is not set
Date: Wed, 10 Oct 2007 15:00:35 -0400	[thread overview]
Message-ID: <20071010190035.GR31713@thunk.org> (raw)
In-Reply-To: <1192030210.12131.61.camel@dyn9047017100.beaverton.ibm.com>

On Wed, Oct 10, 2007 at 08:30:10AM -0700, Badari Pulavarty wrote:
> Its a good start. I think there are lots of proc handling routines that
> can be move into #ifdef CONFIG_PROC_FS also.
> 
> All the code around ext4_mb_read_prealloc_table(),
> ext4_mb_write_prealloc_table(), MB_PROC_VALUE_READ(stats),
> MB_PROC_VALUE_WRITE(stats), .. can be ifdefed out.

There's no need to ifdef them out; in include/proc_fs.h there are the
following convenience #define's if CONFIG_PROC_FS is not defined:

#define remove_proc_entry(name, parent) do {} while (0)
static inline struct proc_dir_entry *proc_symlink(const char *name,
		struct proc_dir_entry *parent,const char *dest) {return NULL;}
static inline struct proc_dir_entry *proc_mkdir(const char *name,
	struct proc_dir_entry *parent) {return NULL;}

static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
	mode_t mode, struct proc_dir_entry *base, 
	read_proc_t *read_proc, void * data) { return NULL; }
static inline struct proc_dir_entry *create_proc_info_entry(const char *name,
	mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
	{ return NULL; }

Adding the #ifdef's just makes the code look ugly, and for no purpose,
since the compiler will take care of removing the code for us.

Regards,

      	  	   	     	     - Ted

  reply	other threads:[~2007-10-10 19:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09  5:50 [patch 0/2] ext4 fixups for 2.6.23-rc8-mm2/ext4 git tree markn
2007-10-09  5:50 ` [patch 1/2] add init_ext4_proc() stub for when CONFIG_PROC_FS is not set markn
2007-10-09 16:31   ` Badari Pulavarty
2007-10-09 17:03     ` Mingming Cao
2007-10-09 17:28       ` Badari Pulavarty
2007-10-09 17:40       ` Theodore Tso
2007-10-10  0:22         ` Theodore Tso
2007-10-10 15:30           ` Badari Pulavarty
2007-10-10 19:00             ` Theodore Tso [this message]
2007-10-11 20:00               ` Badari Pulavarty
2007-10-10  0:22     ` Mark Nelson
2007-10-09  5:50 ` [patch 2/2] move init_ext4_proc() last and add cleanup call exit_ext4_proc() markn
2007-10-09 16:22   ` Badari Pulavarty
2007-10-10  0:11     ` Mark Nelson
2007-10-10  0:34     ` Theodore Tso
2007-10-10  0:41   ` Theodore Tso
2007-10-10  0:50     ` Mark Nelson

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=20071010190035.GR31713@thunk.org \
    --to=tytso@mit.edu \
    --cc=aarora@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=markn@au1.ibm.com \
    --cc=pbadari@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).