Re: [PATCH v7 11/44] [media] media: use entity.graph_obj.mdev instead of .parent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 25, 2015 at 12:36 AM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
> On 08/23/2015 10:17 PM, Mauro Carvalho Chehab wrote:
>> From: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
>>
>> The struct media_entity has a .parent field that stores a pointer
>> to the parent struct media_device. But recently a media_gobj was
>> embedded into the entities and since struct media_gojb already has
>> a pointer to a struct media_device in the .mdev field, the .parent
>> field becomes redundant and can be removed.
>>
>> This patch replaces all the usage of .parent by .graph_obj.mdev so
>> that field will become unused and can be removed on a later patch.
>>
>> No functional changes.
>>
>> The transformation was made using the following coccinelle spatch:
>>
>> @@
>> struct media_entity *me;
>> @@
>>
>> - me->parent
>> + me->graph_obj.mdev
>>
>> @@
>> struct media_entity *link;
>> @@
>>
>> - link->source->entity->parent
>> + link->source->entity->graph_obj.mdev
>>
>> @@
>> struct exynos_video_entity *ve;
>> @@
>>
>> - ve->vdev.entity.parent
>> + ve->vdev.entity.graph_obj.mdev
>>
>> Suggested-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx>
>>
>> Signed-off-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
>> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx>
>
> Acked-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>

The change looks good to me. I would really like to see a before and after
media graph with these changes, this patch and series in general.

thanks,
-- Shuah
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux