From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mauro Carvalho Chehab Subject: Re: [PATCH v7 11/44] [media] media: use entity.graph_obj.mdev instead of .parent Date: Wed, 26 Aug 2015 11:59:05 -0300 Message-ID: <20150826115905.3a953918@recife.lan> References: <55DC0D08.10504@xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-media-owner@vger.kernel.org To: Shuah Khan Cc: Hans Verkuil , Linux Media Mailing List , Javier Martinez Canillas , Mauro Carvalho Chehab , Kyungmin Park , Sylwester Nawrocki , Kukjin Kim , Krzysztof Kozlowski , Laurent Pinchart , Hyun Kwon , Michal Simek , =?UTF-8?B?U8O2cmVu?= Brinkmann , 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, shuahkh@osg.samsung.com List-Id: linux-samsung-soc@vger.kernel.org Em Tue, 25 Aug 2015 13:25:15 -0600 Shuah Khan escreveu: > On Tue, Aug 25, 2015 at 12:36 AM, Hans Verkuil wrote: > > 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 > > 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. Well, it shouldn't change. If something changes, things would be wrong :) Btw, Javier is doing a before/after tests on OMAP3. There are a few fixup things to be added/adjusted (unfortunately, OMAP3 doesn't compile on x86 COMPILE_TEST), but on his tests, the differences between before and after, with media-ctl are zero. As media-ctl is using the legacy API, it shouldn't have any changes there, otherwise something is broken and should be fixed ;) I'll spin this patch series with Javier fixes for OMAP at the next version of this patch series. > > thanks, > -- Shuah