dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: "Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Airlie" <airlied@linux.ie>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH 12/31] drm/amdgpu: use kmemdup rather than duplicating its implementation
Date: Wed, 16 Sep 2015 11:56:43 +0200	[thread overview]
Message-ID: <55F93CDB.70505@samsung.com> (raw)
In-Reply-To: <1438934377-4922-13-git-send-email-a.hajda@samsung.com>

Ping.

Regards
Andrzej

On 08/07/2015 09:59 AM, 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>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 8da6424..94bd992 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -549,12 +549,10 @@ int amdgpu_bo_set_metadata (struct amdgpu_bo *bo, void *metadata,
>  	if (metadata == NULL)
>  		return -EINVAL;
>  
> -	buffer = kzalloc(metadata_size, GFP_KERNEL);
> +	buffer = kmemdup(metadata, metadata_size, GFP_KERNEL);
>  	if (buffer == NULL)
>  		return -ENOMEM;
>  
> -	memcpy(buffer, metadata, metadata_size);
> -
>  	kfree(bo->metadata);
>  	bo->metadata_flags = flags;
>  	bo->metadata = buffer;

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-09-16  9:56 UTC|newest]

Thread overview: 4+ 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 12/31] drm/amdgpu: use kmemdup rather than duplicating its implementation Andrzej Hajda
2015-09-16  9:56   ` Andrzej Hajda [this message]
2015-09-16 16:21     ` Christian König
2015-09-21 21:36       ` Alex Deucher

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=55F93CDB.70505@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /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