* [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
@ 2012-09-10 13:14 ` Fengguang Wu
0 siblings, 0 replies; 18+ messages in thread
From: Fengguang Wu @ 2012-09-10 13:14 UTC (permalink / raw)
To: Andrew Morton
Cc: Glauber Costa, kernel-janitors, Linux Memory Management List
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
struct idr_layer {
unsigned long bitmap; /* A zero bit means "space here" */
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
@ 2012-09-10 13:14 ` Fengguang Wu
0 siblings, 0 replies; 18+ messages in thread
From: Fengguang Wu @ 2012-09-10 13:14 UTC (permalink / raw)
To: Andrew Morton
Cc: Glauber Costa, kernel-janitors, Linux Memory Management List
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
struct idr_layer {
unsigned long bitmap; /* A zero bit means "space here" */
--
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>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
2012-09-10 13:14 ` Fengguang Wu
@ 2012-09-10 14:07 ` Glauber Costa
-1 siblings, 0 replies; 18+ messages in thread
From: Glauber Costa @ 2012-09-10 14:07 UTC (permalink / raw)
To: Fengguang Wu; +Cc: Andrew Morton, kernel-janitors, Linux Memory Management List
On 09/10/2012 05:14 PM, Fengguang Wu wrote:
> 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>
Acked-by: Glauber Costa <glommer@parallels.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
@ 2012-09-10 14:07 ` Glauber Costa
0 siblings, 0 replies; 18+ messages in thread
From: Glauber Costa @ 2012-09-10 14:07 UTC (permalink / raw)
To: Fengguang Wu; +Cc: Andrew Morton, kernel-janitors, Linux Memory Management List
On 09/10/2012 05:14 PM, Fengguang Wu wrote:
> 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>
Acked-by: Glauber Costa <glommer@parallels.com>
--
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>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
2012-09-10 13:14 ` Fengguang Wu
@ 2012-09-10 16:12 ` walter harms
-1 siblings, 0 replies; 18+ messages in thread
From: walter harms @ 2012-09-10 16:12 UTC (permalink / raw)
To: Fengguang Wu
Cc: Andrew Morton, Glauber Costa, kernel-janitors,
Linux Memory Management List
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
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
@ 2012-09-10 16:12 ` walter harms
0 siblings, 0 replies; 18+ messages in thread
From: walter harms @ 2012-09-10 16:12 UTC (permalink / raw)
To: Fengguang Wu
Cc: Andrew Morton, Glauber Costa, kernel-janitors,
Linux Memory Management List
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>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
2012-09-10 13:14 ` Fengguang Wu
@ 2012-09-11 8:27 ` Bernd Petrovitsch
-1 siblings, 0 replies; 18+ messages in thread
From: Bernd Petrovitsch @ 2012-09-11 8:27 UTC (permalink / raw)
To: Fengguang Wu
Cc: Andrew Morton, Glauber Costa, kernel-janitors,
Linux Memory Management List
Hi!
On Mon, 2012-09-10 at 21:14 +0800, Fengguang Wu wrote:
> 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
And while you are it: Please add '(' and ')' around it as in
#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
#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.
Bernd
--
Bernd Petrovitsch Email : bernd@petrovitsch.priv.at
LUGA : http://www.luga.at
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
@ 2012-09-11 8:27 ` Bernd Petrovitsch
0 siblings, 0 replies; 18+ messages in thread
From: Bernd Petrovitsch @ 2012-09-11 8:27 UTC (permalink / raw)
To: Fengguang Wu
Cc: Andrew Morton, Glauber Costa, kernel-janitors,
Linux Memory Management List
Hi!
On Mon, 2012-09-10 at 21:14 +0800, Fengguang Wu wrote:
> 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
And while you are it: Please add '(' and ')' around it as in
#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
#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.
Bernd
--
Bernd Petrovitsch Email : bernd@petrovitsch.priv.at
LUGA : http://www.luga.at
--
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>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
2012-09-11 8:27 ` Bernd Petrovitsch
@ 2012-09-11 9:47 ` Fengguang Wu
-1 siblings, 0 replies; 18+ messages in thread
From: Fengguang Wu @ 2012-09-11 9:47 UTC (permalink / raw)
To: Bernd Petrovitsch
Cc: Andrew Morton, Glauber Costa, kernel-janitors,
Linux Memory Management List
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
@ 2012-09-11 9:47 ` Fengguang Wu
0 siblings, 0 replies; 18+ messages in thread
From: Fengguang Wu @ 2012-09-11 9:47 UTC (permalink / raw)
To: Bernd Petrovitsch
Cc: Andrew Morton, Glauber Costa, kernel-janitors,
Linux Memory Management List
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>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
2012-09-10 16:12 ` walter harms
@ 2012-09-11 9:48 ` Fengguang Wu
-1 siblings, 0 replies; 18+ messages in thread
From: Fengguang Wu @ 2012-09-11 9:48 UTC (permalink / raw)
To: walter harms
Cc: Andrew Morton, Glauber Costa, kernel-janitors,
Linux Memory Management List
On Mon, Sep 10, 2012 at 06:12:50PM +0200, walter harms wrote:
>
>
> 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 ?
Perhaps not. One is derived from the other.
> If not i would argue to give both the same names either ID or IDR.
I had the same thought, however gave up at the time because it would
make the patch more intrusive. Anyway, here is the new patch for your
comments.
--
idr: Rename MAX_LEVEL to MAX_IDR_LEVEL
To avoid name conflicts:
drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined
While at it, also make the other names more consistent and
add parentheses.
Cc: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
Cc: walter harms <wharms@bfs.de>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
include/linux/idr.h | 10 +++++-----
lib/idr.c | 18 +++++++++---------
2 files changed, 14 insertions(+), 14 deletions(-)
--- linux.orig/include/linux/idr.h 2012-09-11 17:37:41.533777968 +0800
+++ linux/include/linux/idr.h 2012-09-11 17:38:03.841777248 +0800
@@ -38,15 +38,15 @@
#define IDR_SIZE (1 << IDR_BITS)
#define IDR_MASK ((1 << IDR_BITS)-1)
-#define MAX_ID_SHIFT (sizeof(int)*8 - 1)
-#define MAX_ID_BIT (1U << MAX_ID_SHIFT)
-#define MAX_ID_MASK (MAX_ID_BIT - 1)
+#define MAX_IDR_SHIFT (sizeof(int)*8 - 1)
+#define MAX_IDR_BIT (1U << MAX_IDR_SHIFT)
+#define MAX_IDR_MASK (MAX_IDR_BIT - 1)
/* Leave the possibility of an incomplete final layer */
-#define MAX_LEVEL (MAX_ID_SHIFT + IDR_BITS - 1) / IDR_BITS
+#define MAX_IDR_LEVEL ((MAX_IDR_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 MAX_IDR_FREE (MAX_IDR_LEVEL * 2)
struct idr_layer {
unsigned long bitmap; /* A zero bit means "space here" */
--- linux.orig/lib/idr.c 2012-09-11 17:38:02.381777295 +0800
+++ linux/lib/idr.c 2012-09-11 17:38:09.085777079 +0800
@@ -20,7 +20,7 @@
* that id to this code and it returns your pointer.
* You can release ids at any time. When all ids are released, most of
- * the memory is returned (we keep IDR_FREE_MAX) in a local pool so we
+ * the memory is returned (we keep MAX_IDR_FREE) in a local pool so we
* don't need to go to the memory "store" during an id allocate, just
* so you don't need to be too concerned about locking and conflicts
* with the slab allocator.
@@ -122,7 +122,7 @@ static void idr_mark_full(struct idr_lay
*/
int idr_pre_get(struct idr *idp, gfp_t gfp_mask)
{
- while (idp->id_free_cnt < IDR_FREE_MAX) {
+ while (idp->id_free_cnt < MAX_IDR_FREE) {
struct idr_layer *new;
new = kmem_cache_zalloc(idr_layer_cache, gfp_mask);
if (new = NULL)
@@ -179,7 +179,7 @@ static int sub_alloc(struct idr *idp, in
sh = IDR_BITS*l;
id = ((id >> sh) ^ n ^ m) << sh;
}
- if ((id >= MAX_ID_BIT) || (id < 0))
+ if ((id >= MAX_IDR_BIT) || (id < 0))
return IDR_NOMORE_SPACE;
if (l = 0)
break;
@@ -402,7 +402,7 @@ void idr_remove(struct idr *idp, int id)
struct idr_layer *to_free;
/* Mask off upper bits we don't use for the search. */
- id &= MAX_ID_MASK;
+ id &= MAX_IDR_MASK;
sub_remove(idp, (idp->layers - 1) * IDR_BITS, id);
if (idp->top && idp->top->count = 1 && (idp->layers > 1) &&
@@ -420,7 +420,7 @@ void idr_remove(struct idr *idp, int id)
to_free->bitmap = to_free->count = 0;
free_layer(to_free);
}
- while (idp->id_free_cnt >= IDR_FREE_MAX) {
+ while (idp->id_free_cnt >= MAX_IDR_FREE) {
p = get_from_free_list(idp);
/*
* Note: we don't call the rcu callback here, since the only
@@ -517,7 +517,7 @@ void *idr_find(struct idr *idp, int id)
n = (p->layer+1) * IDR_BITS;
/* Mask off upper bits we don't use for the search. */
- id &= MAX_ID_MASK;
+ id &= MAX_IDR_MASK;
if (id >= (1 << n))
return NULL;
@@ -659,7 +659,7 @@ void *idr_replace(struct idr *idp, void
n = (p->layer+1) * IDR_BITS;
- id &= MAX_ID_MASK;
+ id &= MAX_IDR_MASK;
if (id >= (1 << n))
return ERR_PTR(-EINVAL);
@@ -793,7 +793,7 @@ int ida_get_new_above(struct ida *ida, i
if (t < 0)
return _idr_rc_to_errno(t);
- if (t * IDA_BITMAP_BITS >= MAX_ID_BIT)
+ if (t * IDA_BITMAP_BITS >= MAX_IDR_BIT)
return -ENOSPC;
if (t != idr_id)
@@ -827,7 +827,7 @@ int ida_get_new_above(struct ida *ida, i
}
id = idr_id * IDA_BITMAP_BITS + t;
- if (id >= MAX_ID_BIT)
+ if (id >= MAX_IDR_BIT)
return -ENOSPC;
__set_bit(t, bitmap->bitmap);
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
@ 2012-09-11 9:48 ` Fengguang Wu
0 siblings, 0 replies; 18+ messages in thread
From: Fengguang Wu @ 2012-09-11 9:48 UTC (permalink / raw)
To: walter harms
Cc: Andrew Morton, Glauber Costa, kernel-janitors,
Linux Memory Management List
On Mon, Sep 10, 2012 at 06:12:50PM +0200, walter harms wrote:
>
>
> 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 ?
Perhaps not. One is derived from the other.
> If not i would argue to give both the same names either ID or IDR.
I had the same thought, however gave up at the time because it would
make the patch more intrusive. Anyway, here is the new patch for your
comments.
--
idr: Rename MAX_LEVEL to MAX_IDR_LEVEL
To avoid name conflicts:
drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined
While at it, also make the other names more consistent and
add parentheses.
Cc: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
Cc: walter harms <wharms@bfs.de>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
include/linux/idr.h | 10 +++++-----
lib/idr.c | 18 +++++++++---------
2 files changed, 14 insertions(+), 14 deletions(-)
--- linux.orig/include/linux/idr.h 2012-09-11 17:37:41.533777968 +0800
+++ linux/include/linux/idr.h 2012-09-11 17:38:03.841777248 +0800
@@ -38,15 +38,15 @@
#define IDR_SIZE (1 << IDR_BITS)
#define IDR_MASK ((1 << IDR_BITS)-1)
-#define MAX_ID_SHIFT (sizeof(int)*8 - 1)
-#define MAX_ID_BIT (1U << MAX_ID_SHIFT)
-#define MAX_ID_MASK (MAX_ID_BIT - 1)
+#define MAX_IDR_SHIFT (sizeof(int)*8 - 1)
+#define MAX_IDR_BIT (1U << MAX_IDR_SHIFT)
+#define MAX_IDR_MASK (MAX_IDR_BIT - 1)
/* Leave the possibility of an incomplete final layer */
-#define MAX_LEVEL (MAX_ID_SHIFT + IDR_BITS - 1) / IDR_BITS
+#define MAX_IDR_LEVEL ((MAX_IDR_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 MAX_IDR_FREE (MAX_IDR_LEVEL * 2)
struct idr_layer {
unsigned long bitmap; /* A zero bit means "space here" */
--- linux.orig/lib/idr.c 2012-09-11 17:38:02.381777295 +0800
+++ linux/lib/idr.c 2012-09-11 17:38:09.085777079 +0800
@@ -20,7 +20,7 @@
* that id to this code and it returns your pointer.
* You can release ids at any time. When all ids are released, most of
- * the memory is returned (we keep IDR_FREE_MAX) in a local pool so we
+ * the memory is returned (we keep MAX_IDR_FREE) in a local pool so we
* don't need to go to the memory "store" during an id allocate, just
* so you don't need to be too concerned about locking and conflicts
* with the slab allocator.
@@ -122,7 +122,7 @@ static void idr_mark_full(struct idr_lay
*/
int idr_pre_get(struct idr *idp, gfp_t gfp_mask)
{
- while (idp->id_free_cnt < IDR_FREE_MAX) {
+ while (idp->id_free_cnt < MAX_IDR_FREE) {
struct idr_layer *new;
new = kmem_cache_zalloc(idr_layer_cache, gfp_mask);
if (new == NULL)
@@ -179,7 +179,7 @@ static int sub_alloc(struct idr *idp, in
sh = IDR_BITS*l;
id = ((id >> sh) ^ n ^ m) << sh;
}
- if ((id >= MAX_ID_BIT) || (id < 0))
+ if ((id >= MAX_IDR_BIT) || (id < 0))
return IDR_NOMORE_SPACE;
if (l == 0)
break;
@@ -402,7 +402,7 @@ void idr_remove(struct idr *idp, int id)
struct idr_layer *to_free;
/* Mask off upper bits we don't use for the search. */
- id &= MAX_ID_MASK;
+ id &= MAX_IDR_MASK;
sub_remove(idp, (idp->layers - 1) * IDR_BITS, id);
if (idp->top && idp->top->count == 1 && (idp->layers > 1) &&
@@ -420,7 +420,7 @@ void idr_remove(struct idr *idp, int id)
to_free->bitmap = to_free->count = 0;
free_layer(to_free);
}
- while (idp->id_free_cnt >= IDR_FREE_MAX) {
+ while (idp->id_free_cnt >= MAX_IDR_FREE) {
p = get_from_free_list(idp);
/*
* Note: we don't call the rcu callback here, since the only
@@ -517,7 +517,7 @@ void *idr_find(struct idr *idp, int id)
n = (p->layer+1) * IDR_BITS;
/* Mask off upper bits we don't use for the search. */
- id &= MAX_ID_MASK;
+ id &= MAX_IDR_MASK;
if (id >= (1 << n))
return NULL;
@@ -659,7 +659,7 @@ void *idr_replace(struct idr *idp, void
n = (p->layer+1) * IDR_BITS;
- id &= MAX_ID_MASK;
+ id &= MAX_IDR_MASK;
if (id >= (1 << n))
return ERR_PTR(-EINVAL);
@@ -793,7 +793,7 @@ int ida_get_new_above(struct ida *ida, i
if (t < 0)
return _idr_rc_to_errno(t);
- if (t * IDA_BITMAP_BITS >= MAX_ID_BIT)
+ if (t * IDA_BITMAP_BITS >= MAX_IDR_BIT)
return -ENOSPC;
if (t != idr_id)
@@ -827,7 +827,7 @@ int ida_get_new_above(struct ida *ida, i
}
id = idr_id * IDA_BITMAP_BITS + t;
- if (id >= MAX_ID_BIT)
+ if (id >= MAX_IDR_BIT)
return -ENOSPC;
__set_bit(t, bitmap->bitmap);
--
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>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
2012-09-11 9:48 ` Fengguang Wu
@ 2012-09-12 23:03 ` Andrew Morton
-1 siblings, 0 replies; 18+ messages in thread
From: Andrew Morton @ 2012-09-12 23:03 UTC (permalink / raw)
To: Fengguang Wu
Cc: walter harms, Glauber Costa, kernel-janitors,
Linux Memory Management List
On Tue, 11 Sep 2012 17:48:23 +0800
Fengguang Wu <fengguang.wu@intel.com> wrote:
> idr: Rename MAX_LEVEL to MAX_IDR_LEVEL
>
> To avoid name conflicts:
>
> drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined
>
> While at it, also make the other names more consistent and
> add parentheses.
That was a rather modest effort :(
drivers/i2c/i2c-core.c | 2 +-
drivers/infiniband/core/cm.c | 2 +-
drivers/pps/pps.c | 2 +-
drivers/thermal/thermal_sys.c | 2 +-
fs/super.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff -puN drivers/i2c/i2c-core.c~idr-rename-max_level-to-max_idr_level-fix drivers/i2c/i2c-core.c
--- a/drivers/i2c/i2c-core.c~idr-rename-max_level-to-max_idr_level-fix
+++ a/drivers/i2c/i2c-core.c
@@ -982,7 +982,7 @@ int i2c_add_numbered_adapter(struct i2c_
if (adap->nr = -1) /* -1 means dynamically assign bus id */
return i2c_add_adapter(adap);
- if (adap->nr & ~MAX_ID_MASK)
+ if (adap->nr & ~MAX_IDR_MASK)
return -EINVAL;
retry:
diff -puN drivers/infiniband/core/cm.c~idr-rename-max_level-to-max_idr_level-fix drivers/infiniband/core/cm.c
--- a/drivers/infiniband/core/cm.c~idr-rename-max_level-to-max_idr_level-fix
+++ a/drivers/infiniband/core/cm.c
@@ -390,7 +390,7 @@ static int cm_alloc_id(struct cm_id_priv
ret = idr_get_new_above(&cm.local_id_table, cm_id_priv,
next_id, &id);
if (!ret)
- next_id = ((unsigned) id + 1) & MAX_ID_MASK;
+ next_id = ((unsigned) id + 1) & MAX_IDR_MASK;
spin_unlock_irqrestore(&cm.lock, flags);
} while( (ret = -EAGAIN) && idr_pre_get(&cm.local_id_table, GFP_KERNEL) );
diff -puN drivers/pps/pps.c~idr-rename-max_level-to-max_idr_level-fix drivers/pps/pps.c
--- a/drivers/pps/pps.c~idr-rename-max_level-to-max_idr_level-fix
+++ a/drivers/pps/pps.c
@@ -306,7 +306,7 @@ int pps_register_cdev(struct pps_device
if (err < 0)
return err;
- pps->id &= MAX_ID_MASK;
+ pps->id &= MAX_IDR_MASK;
if (pps->id >= PPS_MAX_SOURCES) {
pr_err("%s: too many PPS sources in the system\n",
pps->info.name);
diff -puN drivers/thermal/thermal_sys.c~idr-rename-max_level-to-max_idr_level-fix drivers/thermal/thermal_sys.c
--- a/drivers/thermal/thermal_sys.c~idr-rename-max_level-to-max_idr_level-fix
+++ a/drivers/thermal/thermal_sys.c
@@ -78,7 +78,7 @@ again:
else if (unlikely(err))
return err;
- *id = *id & MAX_ID_MASK;
+ *id = *id & MAX_IDR_MASK;
return 0;
}
diff -puN fs/super.c~idr-rename-max_level-to-max_idr_level-fix fs/super.c
--- a/fs/super.c~idr-rename-max_level-to-max_idr_level-fix
+++ a/fs/super.c
@@ -871,7 +871,7 @@ int get_anon_bdev(dev_t *p)
else if (error)
return -EAGAIN;
- if ((dev & MAX_ID_MASK) = (1 << MINORBITS)) {
+ if ((dev & MAX_IDR_MASK) = (1 << MINORBITS)) {
spin_lock(&unnamed_dev_lock);
ida_remove(&unnamed_dev_ida, dev);
if (unnamed_dev_start > dev)
_
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
@ 2012-09-12 23:03 ` Andrew Morton
0 siblings, 0 replies; 18+ messages in thread
From: Andrew Morton @ 2012-09-12 23:03 UTC (permalink / raw)
To: Fengguang Wu
Cc: walter harms, Glauber Costa, kernel-janitors,
Linux Memory Management List
On Tue, 11 Sep 2012 17:48:23 +0800
Fengguang Wu <fengguang.wu@intel.com> wrote:
> idr: Rename MAX_LEVEL to MAX_IDR_LEVEL
>
> To avoid name conflicts:
>
> drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined
>
> While at it, also make the other names more consistent and
> add parentheses.
That was a rather modest effort :(
drivers/i2c/i2c-core.c | 2 +-
drivers/infiniband/core/cm.c | 2 +-
drivers/pps/pps.c | 2 +-
drivers/thermal/thermal_sys.c | 2 +-
fs/super.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff -puN drivers/i2c/i2c-core.c~idr-rename-max_level-to-max_idr_level-fix drivers/i2c/i2c-core.c
--- a/drivers/i2c/i2c-core.c~idr-rename-max_level-to-max_idr_level-fix
+++ a/drivers/i2c/i2c-core.c
@@ -982,7 +982,7 @@ int i2c_add_numbered_adapter(struct i2c_
if (adap->nr == -1) /* -1 means dynamically assign bus id */
return i2c_add_adapter(adap);
- if (adap->nr & ~MAX_ID_MASK)
+ if (adap->nr & ~MAX_IDR_MASK)
return -EINVAL;
retry:
diff -puN drivers/infiniband/core/cm.c~idr-rename-max_level-to-max_idr_level-fix drivers/infiniband/core/cm.c
--- a/drivers/infiniband/core/cm.c~idr-rename-max_level-to-max_idr_level-fix
+++ a/drivers/infiniband/core/cm.c
@@ -390,7 +390,7 @@ static int cm_alloc_id(struct cm_id_priv
ret = idr_get_new_above(&cm.local_id_table, cm_id_priv,
next_id, &id);
if (!ret)
- next_id = ((unsigned) id + 1) & MAX_ID_MASK;
+ next_id = ((unsigned) id + 1) & MAX_IDR_MASK;
spin_unlock_irqrestore(&cm.lock, flags);
} while( (ret == -EAGAIN) && idr_pre_get(&cm.local_id_table, GFP_KERNEL) );
diff -puN drivers/pps/pps.c~idr-rename-max_level-to-max_idr_level-fix drivers/pps/pps.c
--- a/drivers/pps/pps.c~idr-rename-max_level-to-max_idr_level-fix
+++ a/drivers/pps/pps.c
@@ -306,7 +306,7 @@ int pps_register_cdev(struct pps_device
if (err < 0)
return err;
- pps->id &= MAX_ID_MASK;
+ pps->id &= MAX_IDR_MASK;
if (pps->id >= PPS_MAX_SOURCES) {
pr_err("%s: too many PPS sources in the system\n",
pps->info.name);
diff -puN drivers/thermal/thermal_sys.c~idr-rename-max_level-to-max_idr_level-fix drivers/thermal/thermal_sys.c
--- a/drivers/thermal/thermal_sys.c~idr-rename-max_level-to-max_idr_level-fix
+++ a/drivers/thermal/thermal_sys.c
@@ -78,7 +78,7 @@ again:
else if (unlikely(err))
return err;
- *id = *id & MAX_ID_MASK;
+ *id = *id & MAX_IDR_MASK;
return 0;
}
diff -puN fs/super.c~idr-rename-max_level-to-max_idr_level-fix fs/super.c
--- a/fs/super.c~idr-rename-max_level-to-max_idr_level-fix
+++ a/fs/super.c
@@ -871,7 +871,7 @@ int get_anon_bdev(dev_t *p)
else if (error)
return -EAGAIN;
- if ((dev & MAX_ID_MASK) == (1 << MINORBITS)) {
+ if ((dev & MAX_IDR_MASK) == (1 << MINORBITS)) {
spin_lock(&unnamed_dev_lock);
ida_remove(&unnamed_dev_ida, dev);
if (unnamed_dev_start > dev)
_
--
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>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
2012-09-12 23:03 ` Andrew Morton
@ 2012-09-12 23:38 ` Fengguang Wu
-1 siblings, 0 replies; 18+ messages in thread
From: Fengguang Wu @ 2012-09-12 23:38 UTC (permalink / raw)
To: Andrew Morton
Cc: walter harms, Glauber Costa, kernel-janitors,
Linux Memory Management List
On Wed, Sep 12, 2012 at 04:03:02PM -0700, Andrew Morton wrote:
> On Tue, 11 Sep 2012 17:48:23 +0800
> Fengguang Wu <fengguang.wu@intel.com> wrote:
>
> > idr: Rename MAX_LEVEL to MAX_IDR_LEVEL
> >
> > To avoid name conflicts:
> >
> > drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined
> >
> > While at it, also make the other names more consistent and
> > add parentheses.
>
> That was a rather modest effort :(
>
> drivers/i2c/i2c-core.c | 2 +-
> drivers/infiniband/core/cm.c | 2 +-
> drivers/pps/pps.c | 2 +-
> drivers/thermal/thermal_sys.c | 2 +-
> fs/super.c | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: idr-rename-max_level-to-max_idr_level-fix-fix-2
>
> ho hum
>
> lib/idr.c | 14 +++++++-------
Embarrassing.. Sorry for not build testing it at all!
Regards,
Fengguang
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
@ 2012-09-12 23:38 ` Fengguang Wu
0 siblings, 0 replies; 18+ messages in thread
From: Fengguang Wu @ 2012-09-12 23:38 UTC (permalink / raw)
To: Andrew Morton
Cc: walter harms, Glauber Costa, kernel-janitors,
Linux Memory Management List
On Wed, Sep 12, 2012 at 04:03:02PM -0700, Andrew Morton wrote:
> On Tue, 11 Sep 2012 17:48:23 +0800
> Fengguang Wu <fengguang.wu@intel.com> wrote:
>
> > idr: Rename MAX_LEVEL to MAX_IDR_LEVEL
> >
> > To avoid name conflicts:
> >
> > drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined
> >
> > While at it, also make the other names more consistent and
> > add parentheses.
>
> That was a rather modest effort :(
>
> drivers/i2c/i2c-core.c | 2 +-
> drivers/infiniband/core/cm.c | 2 +-
> drivers/pps/pps.c | 2 +-
> drivers/thermal/thermal_sys.c | 2 +-
> fs/super.c | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: idr-rename-max_level-to-max_idr_level-fix-fix-2
>
> ho hum
>
> lib/idr.c | 14 +++++++-------
Embarrassing.. Sorry for not build testing it at all!
Regards,
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>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
2012-09-12 23:38 ` Fengguang Wu
@ 2012-09-13 9:50 ` Glauber Costa
-1 siblings, 0 replies; 18+ messages in thread
From: Glauber Costa @ 2012-09-13 9:50 UTC (permalink / raw)
To: Fengguang Wu
Cc: Andrew Morton, walter harms, kernel-janitors,
Linux Memory Management List
On 09/13/2012 03:38 AM, Fengguang Wu wrote:
> On Wed, Sep 12, 2012 at 04:03:02PM -0700, Andrew Morton wrote:
>> On Tue, 11 Sep 2012 17:48:23 +0800
>> Fengguang Wu <fengguang.wu@intel.com> wrote:
>>
>>> idr: Rename MAX_LEVEL to MAX_IDR_LEVEL
>>>
>>> To avoid name conflicts:
>>>
>>> drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined
>>>
>>> While at it, also make the other names more consistent and
>>> add parentheses.
>>
>> That was a rather modest effort :(
>>
>> drivers/i2c/i2c-core.c | 2 +-
>> drivers/infiniband/core/cm.c | 2 +-
>> drivers/pps/pps.c | 2 +-
>> drivers/thermal/thermal_sys.c | 2 +-
>> fs/super.c | 2 +-
>> 5 files changed, 5 insertions(+), 5 deletions(-)
>
>> From: Andrew Morton <akpm@linux-foundation.org>
>> Subject: idr-rename-max_level-to-max_idr_level-fix-fix-2
>>
>> ho hum
>>
>> lib/idr.c | 14 +++++++-------
>
> Embarrassing.. Sorry for not build testing it at all!
>
> Regards,
> Fengguang
>
You can build test it automatically using Fengguang's 0-day test system.
/me runs
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] idr: Rename MAX_LEVEL to MAX_ID_LEVEL
@ 2012-09-13 9:50 ` Glauber Costa
0 siblings, 0 replies; 18+ messages in thread
From: Glauber Costa @ 2012-09-13 9:50 UTC (permalink / raw)
To: Fengguang Wu
Cc: Andrew Morton, walter harms, kernel-janitors,
Linux Memory Management List
On 09/13/2012 03:38 AM, Fengguang Wu wrote:
> On Wed, Sep 12, 2012 at 04:03:02PM -0700, Andrew Morton wrote:
>> On Tue, 11 Sep 2012 17:48:23 +0800
>> Fengguang Wu <fengguang.wu@intel.com> wrote:
>>
>>> idr: Rename MAX_LEVEL to MAX_IDR_LEVEL
>>>
>>> To avoid name conflicts:
>>>
>>> drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined
>>>
>>> While at it, also make the other names more consistent and
>>> add parentheses.
>>
>> That was a rather modest effort :(
>>
>> drivers/i2c/i2c-core.c | 2 +-
>> drivers/infiniband/core/cm.c | 2 +-
>> drivers/pps/pps.c | 2 +-
>> drivers/thermal/thermal_sys.c | 2 +-
>> fs/super.c | 2 +-
>> 5 files changed, 5 insertions(+), 5 deletions(-)
>
>> From: Andrew Morton <akpm@linux-foundation.org>
>> Subject: idr-rename-max_level-to-max_idr_level-fix-fix-2
>>
>> ho hum
>>
>> lib/idr.c | 14 +++++++-------
>
> Embarrassing.. Sorry for not build testing it at all!
>
> Regards,
> Fengguang
>
You can build test it automatically using Fengguang's 0-day test system.
/me runs
--
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>
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2012-09-13 9:53 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
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.