mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia@diku.dk>
To: Dan Carpenter <error27@gmail.com>
Cc: Ed Cashin <ecashin@coraid.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 35/37] drivers/block/aoe: Use kmemdup
Date: Sun, 16 May 2010 18:03:42 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.1005161800140.11288@ask.diku.dk> (raw)
In-Reply-To: <20100516155043.GB12354@bicker>

On Sun, 16 May 2010, Dan Carpenter wrote:

> On Sun, May 16, 2010 at 08:42:59AM -0400, Ed Cashin wrote:
> > On May 15, 2010, at 5:23 PM, Julia Lawall wrote:
> > 
> > > From: Julia Lawall <julia@diku.dk>
> > > 
> > > Use kmemdup when some other buffer is immediately copied into the
> > > allocated region.
> > 
> > I have seen this patch but have no comment about it specifically.
> > 
> > (Because the argument about whether this kind of change
> > adds value in general has already taken place.  I'd say no, but that's 
> > based on a maybe faulty idea that if folks weren't doing this they'd have
> > more time for reviewing patches, etc.)
> 
> Nah nah.  Nit-picky patches like this is what you get when people start
> reviewing code.  It's really hard to review code properly without being
> annoyed and writing clean up patches is very calming.

Actually, someone asked me to convery a kmalloc to kstrdup, and I saw 
kmemdup nearby, and thought why not...  There is also the similar 
memdup_user.  Using that would more significantly simplify the code, in 
particular reducing the amount of error handling code, since it 
encompasses two calls that can fail (kmalloc and copy_from_user).

julia

  reply	other threads:[~2010-05-16 16:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-15 21:23 Julia Lawall
2010-05-16 12:42 ` Ed Cashin
2010-05-16 15:50   ` Dan Carpenter
2010-05-16 16:03     ` Julia Lawall [this message]
2010-05-16 16:38   ` Pekka Enberg

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=Pine.LNX.4.64.1005161800140.11288@ask.diku.dk \
    --to=julia@diku.dk \
    --cc=ecashin@coraid.com \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --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®