All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: Fengguang Wu <fengguang.wu@intel.com>
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: Mon, 10 Sep 2012 16:12:50 +0000	[thread overview]
Message-ID: <504E1182.7080300@bfs.de> (raw)
In-Reply-To: <20120910131426.GA12431@localhost>



Am 10.09.2012 15:14, schrieb Fengguang Wu:
> To avoid name conflicts:
> 
> drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
> 
> Andrew: the conflict happens in Glauber's kmemcg-slab tree.  So it's
> better to quickly push this pre-fix to upstream before Glauber's patches.
> 
> 
>  include/linux/idr.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- linux.orig/include/linux/idr.h	2012-09-10 21:08:51.177452944 +0800
> +++ linux/include/linux/idr.h	2012-09-10 21:08:57.729452732 +0800
> @@ -43,10 +43,10 @@
>  #define MAX_ID_MASK (MAX_ID_BIT - 1)
>  
>  /* Leave the possibility of an incomplete final layer */
> -#define MAX_LEVEL (MAX_ID_SHIFT + IDR_BITS - 1) / IDR_BITS
> +#define MAX_ID_LEVEL (MAX_ID_SHIFT + IDR_BITS - 1) / IDR_BITS
>  
>  /* 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
>  

To be fair, i am a bit confused by the naming.
There is MAX_id_LEVEL but idr_BITS are these different things ?
If not i would argue to give both the same names either ID or IDR.

re,
 wh


>  struct idr_layer {
>  	unsigned long		 bitmap; /* A zero bit means "space here" */
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: walter harms <wharms@bfs.de>
To: Fengguang Wu <fengguang.wu@intel.com>
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: Mon, 10 Sep 2012 18:12:50 +0200	[thread overview]
Message-ID: <504E1182.7080300@bfs.de> (raw)
In-Reply-To: <20120910131426.GA12431@localhost>



Am 10.09.2012 15:14, schrieb Fengguang Wu:
> To avoid name conflicts:
> 
> drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
> 
> Andrew: the conflict happens in Glauber's kmemcg-slab tree.  So it's
> better to quickly push this pre-fix to upstream before Glauber's patches.
> 
> 
>  include/linux/idr.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- linux.orig/include/linux/idr.h	2012-09-10 21:08:51.177452944 +0800
> +++ linux/include/linux/idr.h	2012-09-10 21:08:57.729452732 +0800
> @@ -43,10 +43,10 @@
>  #define MAX_ID_MASK (MAX_ID_BIT - 1)
>  
>  /* Leave the possibility of an incomplete final layer */
> -#define MAX_LEVEL (MAX_ID_SHIFT + IDR_BITS - 1) / IDR_BITS
> +#define MAX_ID_LEVEL (MAX_ID_SHIFT + IDR_BITS - 1) / IDR_BITS
>  
>  /* 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
>  

To be fair, i am a bit confused by the naming.
There is MAX_id_LEVEL but idr_BITS are these different things ?
If not i would argue to give both the same names either ID or IDR.

re,
 wh


>  struct idr_layer {
>  	unsigned long		 bitmap; /* A zero bit means "space here" */
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

--
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>

  parent reply	other threads:[~2012-09-10 16:12 UTC|newest]

Thread overview: 18+ 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 13:14 ` Fengguang Wu
2012-09-10 14:07 ` Glauber Costa
2012-09-10 14:07   ` Glauber Costa
2012-09-10 16:12 ` walter harms [this message]
2012-09-10 16:12   ` walter harms
2012-09-11  9:48   ` Fengguang Wu
2012-09-11  9:48     ` Fengguang Wu
2012-09-12 23:03     ` Andrew Morton
2012-09-12 23:03       ` Andrew Morton
2012-09-12 23:38       ` Fengguang Wu
2012-09-12 23:38         ` Fengguang Wu
2012-09-13  9:50         ` Glauber Costa
2012-09-13  9:50           ` Glauber Costa
2012-09-11  8:27 ` Bernd Petrovitsch
2012-09-11  8:27   ` Bernd Petrovitsch
2012-09-11  9:47   ` Fengguang Wu
2012-09-11  9:47     ` Fengguang Wu

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=504E1182.7080300@bfs.de \
    --to=wharms@bfs.de \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.