mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Pekka Enberg" <penberg@cs.helsinki.fi>
To: "Alexey Dobriyan" <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC 1/2] kmemdup: introduce
Date: Sun, 10 Sep 2006 01:55:26 +0300	[thread overview]
Message-ID: <84144f020609091555g6aa01397qbb167287a478f27c@mail.gmail.com> (raw)
In-Reply-To: <20060909013555.GC5192@martell.zuzino.mipt.ru>

On 9/9/06, Alexey Dobriyan <adobriyan@gmail.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.

  parent reply	other threads:[~2006-09-09 22:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-09  1:35 Alexey Dobriyan
2006-09-09  1:50 ` Andrew Morton
2006-09-09 22:55 ` Pekka Enberg [this message]
2006-09-13 16:17 ` Randy.Dunlap

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=84144f020609091555g6aa01397qbb167287a478f27c@mail.gmail.com \
    --to=penberg@cs.helsinki.fi \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®