linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Glauber Costa <glommer@parallels.com>,
	kernel-janitors@vger.kernel.org,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
Date: Tue, 11 Sep 2012 17:47:38 +0800	[thread overview]
Message-ID: <20120911094738.GA32509@localhost> (raw)
In-Reply-To: <1347352069.14488.12.camel@thorin>

Hi Bernd,

> > -#define MAX_LEVEL (MAX_ID_SHIFT + IDR_BITS - 1) / IDR_BITS
> > +#define MAX_ID_LEVEL (MAX_ID_SHIFT + IDR_BITS - 1) / IDR_BITS
> 
> And while you are it: Please add '(' and ')' around it as in 
> 
> #define MAX_ID_LEVEL ((MAX_ID_SHIFT + IDR_BITS - 1) / IDR_BITS)

Good idea. Done.

> 
> >  /* Number of id_layer structs to leave in free list */
> > -#define IDR_FREE_MAX MAX_LEVEL + MAX_LEVEL
> > +#define IDR_FREE_MAX MAX_ID_LEVEL + MAX_ID_LEVEL
> #define IDR_FREE_MAX (MAX_ID_LEVEL + MAX_ID_LEVEL)
> 
> For starters (sleeping in "cpp-101";-): People may use it as in
> "IDR_FREE_MAX * 2".
> And I didn't look into that file - that should be changed everywhere in
> that way.

Sure. It's the only place that need change.

Thanks,
Fengguang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2012-09-11  9:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10 13:14 [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL Fengguang Wu
2012-09-10 14:07 ` Glauber Costa
2012-09-10 16:12 ` walter harms
2012-09-11  9:48   ` Fengguang Wu
2012-09-12 23:03     ` Andrew Morton
2012-09-12 23:38       ` Fengguang Wu
2012-09-13  9:50         ` Glauber Costa
2012-09-11  8:27 ` Bernd Petrovitsch
2012-09-11  9:47   ` Fengguang Wu [this message]

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=20120911094738.GA32509@localhost \
    --to=fengguang.wu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bernd@petrovitsch.priv.at \
    --cc=glommer@parallels.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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).