[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 10 Sep 2006 01:55:26 +0300
From: "Pekka Enberg" <penberg@...helsinki.fi>
To: "Alexey Dobriyan" <adobriyan@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [RFC 1/2] kmemdup: introduce
On 9/9/06, Alexey Dobriyan <adobriyan@...il.com> wrote:
> +/**
> + * kmemdup - duplicate region of memory
> + *
> + * @src: memory region to duplicate
> + * @len: memory region length
> + * @gfp: GFP mask to use
> + */
> +void *kmemdup(const void *src, size_t len, gfp_t gfp)
> +{
> + void *p;
> +
> + p = ____kmalloc(len, gfp);
> + if (p)
> + memcpy(p, src, len);
> + return p;
> +}
> +EXPORT_SYMBOL(kmemdup);
Assuming there are enough callers that can be converted to justify
this, looks good to me.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists