* [PATCH 12/31] drm/amdgpu: use kmemdup rather than duplicating its implementation [not found] <1438934377-4922-1-git-send-email-a.hajda@samsung.com> @ 2015-08-07 7:59 ` Andrzej Hajda 2015-09-16 9:56 ` Andrzej Hajda 0 siblings, 1 reply; 4+ messages in thread From: Andrzej Hajda @ 2015-08-07 7:59 UTC (permalink / raw) To: Alex Deucher, Christian König, David Airlie Cc: Andrzej Hajda, Marek Szyprowski, linux-kernel, dri-devel, Bartlomiej Zolnierkiewicz 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; -- 1.9.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 12/31] drm/amdgpu: use kmemdup rather than duplicating its implementation 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 2015-09-16 16:21 ` Christian König 0 siblings, 1 reply; 4+ messages in thread From: Andrzej Hajda @ 2015-09-16 9:56 UTC (permalink / raw) To: Alex Deucher, Christian König, David Airlie Cc: Marek Szyprowski, linux-kernel, dri-devel, Bartlomiej Zolnierkiewicz 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 12/31] drm/amdgpu: use kmemdup rather than duplicating its implementation 2015-09-16 9:56 ` Andrzej Hajda @ 2015-09-16 16:21 ` Christian König 2015-09-21 21:36 ` Alex Deucher 0 siblings, 1 reply; 4+ messages in thread From: Christian König @ 2015-09-16 16:21 UTC (permalink / raw) To: Andrzej Hajda, Alex Deucher, Christian König, David Airlie Cc: Bartlomiej Zolnierkiewicz, linux-kernel, dri-devel, Marek Szyprowski On 16.09.2015 11:56, Andrzej Hajda wrote: > 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> Somehow missed that. Patch is Reviewed-by: Christian König <christian.koenig@amd.com>. Regards, Christian. >> --- >> 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 12/31] drm/amdgpu: use kmemdup rather than duplicating its implementation 2015-09-16 16:21 ` Christian König @ 2015-09-21 21:36 ` Alex Deucher 0 siblings, 0 replies; 4+ messages in thread From: Alex Deucher @ 2015-09-21 21:36 UTC (permalink / raw) To: Christian König Cc: Bartlomiej Zolnierkiewicz, LKML, Maling list - DRI developers, Andrzej Hajda, Alex Deucher, Christian König, Marek Szyprowski On Wed, Sep 16, 2015 at 12:21 PM, Christian König <deathsimple@vodafone.de> wrote: > On 16.09.2015 11:56, Andrzej Hajda wrote: >> >> 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> > > > Somehow missed that. Patch is Reviewed-by: Christian König > <christian.koenig@amd.com>. I hadn't seen it either. Applied now. Alex > > Regards, > Christian. > > >>> --- >>> 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 > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-21 21:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
2015-09-16 16:21 ` Christian König
2015-09-21 21:36 ` Alex Deucher
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox