[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20111217120526.29aa2b0b35a70c8038727300@canb.auug.org.au>
Date: Sat, 17 Dec 2011 12:05:26 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] genalloc: add support of named pool
Hi,
On Thu, 8 Dec 2011 16:50:08 +0100 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com> wrote:
>
> struct gen_pool {
> + char *name; /* pool name */
Any reason that this can't be "const char *"?
> +extern struct gen_pool *gen_pool_create_byname(char*, int, int);
const char *
> +extern struct gen_pool* gen_pool_byname(char *name);
const char *
> +/**
> * gen_pool_create - create a new special memory pool
gen_pool_create_byname
> +struct gen_pool *gen_pool_create_byname(char *name, int min_alloc_order, int nid)
const char *
> {
> struct gen_pool *pool;
>
> + if (gen_pool_byname(name))
> + return NULL;
> +
> pool = kmalloc_node(sizeof(struct gen_pool), GFP_KERNEL, nid);
> if (pool != NULL) {
> spin_lock_init(&pool->lock);
> INIT_LIST_HEAD(&pool->chunks);
> pool->min_alloc_order = min_alloc_order;
> }
> +
> + list_add_tail(&pool->list, &pools);
> return pool;
> }
I don't see where you assign pool->name to anything ...
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists