dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nicolai Hähnle" <nhaehnle@gmail.com>
To: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
	'Sean Paul' <seanpaul@google.com>,
	Wei Yongjun <weiyj.lk@gmail.com>
Cc: "Jiang, Sonny" <Sonny.Jiang@amd.com>,
	"Zhou, Jammy" <Jammy.Zhou@amd.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Nath, Arindam" <Arindam.Nath@amd.com>,
	"Liu, Leo" <Leo.Liu@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	"Liu, Monk" <Monk.Liu@amd.com>
Subject: Re: [PATCH -next] drm/amdgpu: use kmemdup rather than duplicating its implementation
Date: Mon, 1 Aug 2016 13:16:54 +0100	[thread overview]
Message-ID: <f37296c1-40db-38dc-1976-0d4a1ab8c2ca@gmail.com> (raw)
In-Reply-To: <CY4PR12MB13011FA11AA662DE894626C1F7010@CY4PR12MB1301.namprd12.prod.outlook.com>

On 29.07.2016 20:38, Deucher, Alexander wrote:
>> -----Original Message-----
>> From: Sean Paul [mailto:seanpaul@google.com]
>> Sent: Friday, July 29, 2016 3:35 PM
>> To: Wei Yongjun
>> Cc: Deucher, Alexander; Koenig, Christian; Dave Airlie; Jiang, Sonny; Liu, Leo;
>> Nath, Arindam; Zhou, David(ChunMing); Zhou, Jammy; Liu, Monk; dri-devel;
>> Linux Kernel Mailing List
>> 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@gmail.com> wrote:
>>> Use kmemdup rather than duplicating its implementation.
>>>
>>> Generated by: scripts/coccinelle/api/memdup.cocci
>>>
>>> Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
>>
>>
>> Thanks for the patch. I'll apply this to -misc once the merge window is closed.
>>
>> Acked-by: Sean Paul <seanpaul@chromium.org>
>
> Unless you've already applied this to the misc tree, I'd prefer to take it via the amdgpu tree.

I recall Christian NAKing an almost identical patch some time ago. 
Something about needing memcpy_fromio()?

Yup, it's here: https://lkml.org/lkml/2016/5/19/235

Cheers,
Nicolai

>
> Alex
>
>>
>>
>>> ---
>>>  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;
>>>  }
>>>
>>>
>>>
>>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-08-01 12:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-28 16:18 [PATCH -next] drm/amdgpu: use kmemdup rather than duplicating its implementation Wei Yongjun
2016-07-29 19:35 ` Sean Paul
2016-07-29 19:38   ` Deucher, Alexander
2016-07-29 19:40     ` Sean Paul
2016-08-01 12:16     ` Nicolai Hähnle [this message]
2016-08-02 13:37       ` Christian König

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=f37296c1-40db-38dc-1976-0d4a1ab8c2ca@gmail.com \
    --to=nhaehnle@gmail.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Arindam.Nath@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Jammy.Zhou@amd.com \
    --cc=Leo.Liu@amd.com \
    --cc=Monk.Liu@amd.com \
    --cc=Sonny.Jiang@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanpaul@google.com \
    --cc=weiyj.lk@gmail.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