public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ying Xue <ying.xue@windriver•com>
To: Andrzej Hajda <a.hajda@samsung•com>, Jon Maloy <jon.maloy@ericsson•com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung•com>,
	Marek Szyprowski <m.szyprowski@samsung•com>,
	<linux-kernel@vger•kernel.org>,
	"David S. Miller" <davem@davemloft•net>, <netdev@vger•kernel.org>
Subject: Re: [PATCH 27/31] net/tipc: use kmemdup rather than duplicating its implementation
Date: Thu, 17 Sep 2015 09:19:05 +0800	[thread overview]
Message-ID: <55FA1509.7090008@windriver.com> (raw)
In-Reply-To: <1438934377-4922-28-git-send-email-a.hajda@samsung.com>

On 08/07/2015 03:59 PM, Andrzej Hajda wrote:
> The patch was generated using fixed coccinelle semantic patch
> scripts/coccinelle/api/memdup.cocci [1].
> 
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320
> 
> Signed-off-by: Andrzej Hajda <a.hajda@samsung•com>

Reviewed-by: Ying Xue <ying.xue@windriver•com>

> ---
>  net/tipc/server.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/net/tipc/server.c b/net/tipc/server.c
> index 922e04a..c187cad 100644
> --- a/net/tipc/server.c
> +++ b/net/tipc/server.c
> @@ -411,13 +411,12 @@ static struct outqueue_entry *tipc_alloc_entry(void *data, int len)
>  	if (!entry)
>  		return NULL;
>  
> -	buf = kmalloc(len, GFP_ATOMIC);
> +	buf = kmemdup(data, len, GFP_ATOMIC);
>  	if (!buf) {
>  		kfree(entry);
>  		return NULL;
>  	}
>  
> -	memcpy(buf, data, len);
>  	entry->iov.iov_base = buf;
>  	entry->iov.iov_len = len;
>  
> 

  parent reply	other threads:[~2015-09-17  1:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1438934377-4922-1-git-send-email-a.hajda@samsung.com>
2015-08-07  7:59 ` [PATCH 16/31] net/cavium/liquidio: use kmemdup rather than duplicating its implementation Andrzej Hajda
2015-09-16 10:02   ` Andrzej Hajda
2015-08-07  7:59 ` [PATCH 26/31] net/sched: " Andrzej Hajda
2015-08-07 10:35   ` Daniel Borkmann
2015-08-07  7:59 ` [PATCH 27/31] net/tipc: " Andrzej Hajda
2015-09-16 10:07   ` Andrzej Hajda
2015-09-17  9:58     ` Jon Maloy
2015-09-17  1:19   ` Ying Xue [this message]
2015-08-07  7:59 ` [PATCH 28/31] net/xfrm: " Andrzej Hajda
2015-08-12 10:25   ` Steffen Klassert

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=55FA1509.7090008@windriver.com \
    --to=ying.xue@windriver$(echo .)com \
    --cc=a.hajda@samsung$(echo .)com \
    --cc=b.zolnierkie@samsung$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=jon.maloy@ericsson$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=m.szyprowski@samsung$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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