[PATCH 2/3] drm/exynos: remove unnecessary sg_alloc_table call
Inki Dae
inki.dae at samsung.com
Thu Nov 8 04:34:48 PST 2012
Applied. And it seems like that another one needs some review So will let
me pick it up later after review.
Thanks,
Inki Dae
2012/11/8 Inki Dae <inki.dae at samsung.com>
>
>
> 2012/11/7 Prathyush K <prathyush.k at samsung.com>
>
>> The function dma_get_sgtable will allocate a sg table internally so
>> it is not necessary to allocate a sg table before it. The unnecessary
>> 'sg_alloc_table' call is removed.
>>
>> Signed-off-by: Prathyush K <prathyush.k at samsung.com>
>> ---
>> drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 8 +-------
>> 1 files changed, 1 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
>> b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
>> index b98da30..d9307bd 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
>> @@ -40,21 +40,15 @@ static struct sg_table *exynos_get_sgt(struct
>> drm_device *drm_dev,
>> if (!sgt)
>> goto out;
>>
>> - ret = sg_alloc_table(sgt, buf->sgt->nents, GFP_KERNEL);
>> - if (ret)
>> - goto err_free_sgt;
>> -
>>
>
> It's good catch. Right, I missed it. dma_get_sgtable function also calls
> sg_alloc_table.
>
>
>> ret = dma_get_sgtable(drm_dev->dev, sgt, buf->kvaddr,
>> buf->dma_addr, buf->size);
>> if (ret < 0) {
>> DRM_ERROR("failed to get sgtable.\n");
>> - goto err_free_table;
>> + goto err_free_sgt;
>> }
>>
>> return sgt;
>>
>> -err_free_table:
>> - sg_free_table(sgt);
>> err_free_sgt:
>> kfree(sgt);
>> sgt = NULL;
>> --
>> 1.7.0.4
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20121108/48c7abfd/attachment-0001.html>
More information about the dri-devel
mailing list