[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOw6vb+Bn0vF5i-1DpTiSh3LBYzaP4VWF096oo2Mwxm_SSbHoQ@mail.gmail.com>
Date: Fri, 29 Jul 2016 15:35:05 -0400
From: Sean Paul <seanpaul@...gle.com>
To: Wei Yongjun <weiyj.lk@...il.com>
Cc: Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
Dave Airlie <airlied@...ux.ie>, sonny.jiang@....com,
leo.liu@....com, arindam.nath@....com, David1.Zhou@....com,
Jammy.Zhou@....com, Monk.Liu@....com,
dri-devel <dri-devel@...ts.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] drm/amdgpu: use kmemdup rather than duplicating its implementation
On Thu, Jul 28, 2016 at 12:18 PM, Wei Yongjun <weiyj.lk@...il.com> wrote:
> Use kmemdup rather than duplicating its implementation.
>
> Generated by: scripts/coccinelle/api/memdup.cocci
>
> Signed-off-by: Wei Yongjun <weiyj.lk@...il.com>
Thanks for the patch. I'll apply this to -misc once the merge window is closed.
Acked-by: Sean Paul <seanpaul@...omium.org>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index a46a64c..b779b5f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -296,12 +296,10 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
> size = amdgpu_bo_size(adev->uvd.vcpu_bo);
> ptr = adev->uvd.cpu_addr;
>
> - adev->uvd.saved_bo = kmalloc(size, GFP_KERNEL);
> + adev->uvd.saved_bo = kmemdup(ptr, size, GFP_KERNEL);
> if (!adev->uvd.saved_bo)
> return -ENOMEM;
>
> - memcpy(adev->uvd.saved_bo, ptr, size);
> -
> return 0;
> }
>
>
>
>
Powered by blists - more mailing lists