From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans Verkuil Subject: Re: [PATCH v7 11/44] [media] media: use entity.graph_obj.mdev instead of .parent Date: Tue, 25 Aug 2015 08:36:56 +0200 Message-ID: <55DC0D08.10504@xs4all.nl> References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-sh-owner@vger.kernel.org To: Mauro Carvalho Chehab , Linux Media Mailing List Cc: Javier Martinez Canillas , Mauro Carvalho Chehab , Kyungmin Park , Sylwester Nawrocki , Kukjin Kim , Krzysztof Kozlowski , Laurent Pinchart , Hyun Kwon , Michal Simek , =?windows-1252?Q?S=F6ren_Brink?= =?windows-1252?Q?mann?= , Greg Kroah-Hartman , Prabhakar Lad , Hans Verkuil , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-sh@vger.kernel.org, devel@driverdev.osuosl.org List-Id: linux-samsung-soc@vger.kernel.org On 08/23/2015 10:17 PM, Mauro Carvalho Chehab wrote: > From: Javier Martinez Canillas > > 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 > > Signed-off-by: Javier Martinez Canillas > Signed-off-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans Verkuil Date: Tue, 25 Aug 2015 06:36:56 +0000 Subject: Re: [PATCH v7 11/44] [media] media: use entity.graph_obj.mdev instead of .parent Message-Id: <55DC0D08.10504@xs4all.nl> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org On 08/23/2015 10:17 PM, Mauro Carvalho Chehab wrote: > From: Javier Martinez Canillas > > 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 > > Signed-off-by: Javier Martinez Canillas > Signed-off-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil From mboxrd@z Thu Jan 1 00:00:00 1970 From: hverkuil@xs4all.nl (Hans Verkuil) Date: Tue, 25 Aug 2015 08:36:56 +0200 Subject: [PATCH v7 11/44] [media] media: use entity.graph_obj.mdev instead of .parent In-Reply-To: References: Message-ID: <55DC0D08.10504@xs4all.nl> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 08/23/2015 10:17 PM, Mauro Carvalho Chehab wrote: > From: Javier Martinez Canillas > > 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 > > Signed-off-by: Javier Martinez Canillas > Signed-off-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil