From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from lists.s-osg.org ([54.187.51.154]:59712 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751763AbbHYJp5 (ORCPT ); Tue, 25 Aug 2015 05:45:57 -0400 Date: Tue, 25 Aug 2015 06:45:52 -0300 From: Mauro Carvalho Chehab To: Hans Verkuil Cc: Linux Media Mailing List , Mauro Carvalho Chehab Subject: Re: [PATCH v7 19/44] [media] media: make link debug printk more generic Message-ID: <20150825064552.6d12ded5@recife.lan> In-Reply-To: <55DC1A3B.2010204@xs4all.nl> References: <55DC1A3B.2010204@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: Em Tue, 25 Aug 2015 09:33:15 +0200 Hans Verkuil escreveu: > On 08/23/2015 10:17 PM, Mauro Carvalho Chehab wrote: > > Remove entity name from the link as this exists only if the object > > type is PAD on both link ends. > > > > Signed-off-by: Mauro Carvalho Chehab > > I am wondering whether it should detect if this is a pad-to-pad link > or an interface-to-entity link and log this accordingly. > > But I think that is better done as a follow-up patch if we think this > is useful. I actually opted to keep the function more generic. We may latter add a per-type specific log here, if needed, but we can always grep at the logs to get the entity or interface name. > So for this patch: > > Acked-by: Hans Verkuil > > > > > diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c > > index 9ec9c503caca..5788297cd500 100644 > > --- a/drivers/media/media-entity.c > > +++ b/drivers/media/media-entity.c > > @@ -106,14 +106,12 @@ static void dev_dbg_obj(const char *event_name, struct media_gobj *gobj) > > struct media_link *link = gobj_to_link(gobj); > > > > dev_dbg(gobj->mdev->dev, > > - "%s: id 0x%08x link#%d: '%s' %s#%d ==> '%s' %s#%d\n", > > + "%s: id 0x%08x link#%d: %s#%d ==> %s#%d\n", > > event_name, gobj->id, media_localid(gobj), > > > > - link->source->entity->name, > > gobj_type(media_type(&link->source->graph_obj)), > > media_localid(&link->source->graph_obj), > > > > - link->sink->entity->name, > > gobj_type(media_type(&link->sink->graph_obj)), > > media_localid(&link->sink->graph_obj)); > > break; > > >