From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH v4 2/6] media: create a macro to get entity ID
Date: Fri, 14 Aug 2015 21:48:57 +0000 [thread overview]
Message-ID: <1784699.akJOgsu3YQ@avalon> (raw)
In-Reply-To: <89205b71de7a6edc3638eb14df8d0b0e4df32bc2.1439563682.git.mchehab@osg.samsung.com>
Hello,
On Saturday 15 August 2015 00:08:55 Sakari Ailus wrote:
> On Fri, Aug 14, 2015 at 11:56:39AM -0300, Mauro Carvalho Chehab wrote:
> ...
>
> > diff --git a/include/media/media-entity.h b/include/media/media-entity.h
> > index 8b21a4d920d9..478d5cd56be9 100644
> > --- a/include/media/media-entity.h
> > +++ b/include/media/media-entity.h
> > @@ -126,6 +126,8 @@ struct media_entity_graph {
> > int top;
> > };
> >
> > +#define entity_id(entity) ((entity)->id)
> > +
> > int media_entity_init(struct media_entity *entity, u16 num_pads,
> > struct media_pad *pads);
> >
> > void media_entity_cleanup(struct media_entity *entity);
>
> media-entity.h is a pretty widely included header file. Perhaps we should
> think about the naming a bit.
>
> All the other names in the header begin with media (or __media); I'd very
> much prefer not changing that pattern.
I'd prefer naming it media_entity_id() as well.
Slightly nitpicking, wouldn't it also be better to make it a static inline
function instead of a macro to ensure type safety ? No strong preference
though.
--
Regards,
Laurent Pinchart
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-sh@vger.kernel.org
Subject: Re: [PATCH v4 2/6] media: create a macro to get entity ID
Date: Sat, 15 Aug 2015 00:48:57 +0300 [thread overview]
Message-ID: <1784699.akJOgsu3YQ@avalon> (raw)
In-Reply-To: <20150814210855.GA28370@valkosipuli.retiisi.org.uk>
Hello,
On Saturday 15 August 2015 00:08:55 Sakari Ailus wrote:
> On Fri, Aug 14, 2015 at 11:56:39AM -0300, Mauro Carvalho Chehab wrote:
> ...
>
> > diff --git a/include/media/media-entity.h b/include/media/media-entity.h
> > index 8b21a4d920d9..478d5cd56be9 100644
> > --- a/include/media/media-entity.h
> > +++ b/include/media/media-entity.h
> > @@ -126,6 +126,8 @@ struct media_entity_graph {
> > int top;
> > };
> >
> > +#define entity_id(entity) ((entity)->id)
> > +
> > int media_entity_init(struct media_entity *entity, u16 num_pads,
> > struct media_pad *pads);
> >
> > void media_entity_cleanup(struct media_entity *entity);
>
> media-entity.h is a pretty widely included header file. Perhaps we should
> think about the naming a bit.
>
> All the other names in the header begin with media (or __media); I'd very
> much prefer not changing that pattern.
I'd prefer naming it media_entity_id() as well.
Slightly nitpicking, wouldn't it also be better to make it a static inline
function instead of a macro to ensure type safety ? No strong preference
though.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2015-08-14 21:48 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-14 14:56 [PATCH v4 2/6] media: create a macro to get entity ID Mauro Carvalho Chehab
2015-08-14 14:56 ` Mauro Carvalho Chehab
2015-08-14 15:02 ` Hans Verkuil
2015-08-14 15:02 ` Hans Verkuil
2015-08-14 21:08 ` Sakari Ailus
2015-08-14 21:08 ` Sakari Ailus
2015-08-14 21:48 ` Laurent Pinchart [this message]
2015-08-14 21:48 ` Laurent Pinchart
-- strict thread matches above, loose matches on Subject: below --
2015-08-14 14:56 [PATCH v4 0/6] MC preparation patches Mauro Carvalho Chehab
2015-08-14 14:56 ` [PATCH v4 1/6] media: get rid of unused "extra_links" param on media_entity_init() Mauro Carvalho Chehab
2015-08-14 14:56 ` Mauro Carvalho Chehab
2015-08-14 14:56 ` Mauro Carvalho Chehab
2015-08-14 14:56 ` Mauro Carvalho Chehab
2015-08-14 14:59 ` Hans Verkuil
2015-08-14 14:59 ` Hans Verkuil
2015-08-14 14:59 ` Hans Verkuil
2015-08-14 14:59 ` Hans Verkuil
2015-08-14 15:16 ` Laurent Pinchart
2015-08-14 15:16 ` Laurent Pinchart
2015-08-14 15:16 ` Laurent Pinchart
2015-08-14 15:16 ` Laurent Pinchart
2015-08-14 14:56 ` [PATCH v4 3/6] media: add a common struct to be embed on media graph objects Mauro Carvalho Chehab
2015-08-14 15:03 ` Hans Verkuil
2015-08-14 21:25 ` Sakari Ailus
2015-08-15 14:56 ` Mauro Carvalho Chehab
2015-08-15 16:42 ` Laurent Pinchart
2015-08-16 11:41 ` Mauro Carvalho Chehab
2015-08-14 14:56 ` [PATCH v4 4/6] media: use media_graph_obj inside entities Mauro Carvalho Chehab
2015-08-14 15:07 ` Hans Verkuil
2015-08-14 22:12 ` Sakari Ailus
2015-08-14 14:56 ` [PATCH v4 5/6] media: use media_graph_obj inside pads Mauro Carvalho Chehab
2015-08-14 15:10 ` Hans Verkuil
2015-08-14 22:15 ` Sakari Ailus
2015-08-14 14:56 ` [PATCH v4 6/6] media: use media_graph_obj inside links Mauro Carvalho Chehab
2015-08-14 15:18 ` Hans Verkuil
2015-08-14 15:33 ` Hans Verkuil
2015-08-14 16:19 ` Mauro Carvalho Chehab
2015-08-14 16:15 ` Mauro Carvalho Chehab
2015-08-14 22:37 ` [PATCH v4 0/6] MC preparation patches Sakari Ailus
2015-08-14 23:27 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1784699.akJOgsu3YQ@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.