From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl,
shuahkh@osg.samsung.com, laurent.pinchart@ideasonboard.com,
Sakari Ailus <sakari.ailus@iki.fi>
Subject: Re: [RFC 1/4] media: Sanitise the reserved fields of the G_TOPOLOGY IOCTL arguments
Date: Mon, 22 Feb 2016 07:23:21 -0300 [thread overview]
Message-ID: <20160222072321.382b235d@recife.lan> (raw)
In-Reply-To: <20160222070047.2a7ee4e1@recife.lan>
Em Mon, 22 Feb 2016 07:00:47 -0300
Mauro Carvalho Chehab <mchehab@osg.samsung.com> escreveu:
> Em Sun, 21 Feb 2016 23:36:12 +0200
> Sakari Ailus <sakari.ailus@linux.intel.com> escreveu:
>
> > From: Sakari Ailus <sakari.ailus@iki.fi>
> >
> > Align them up to a power of two.
>
> Looks OK to me, but I would comment that the structs are aligned to
> 2^n for those structs.
Hmm... on a second tought, I don't think this patch makes any sense.
As those structs will be part of an array at media_v2_topology,
this won't be aligned to a power of two, as we don't require that
the number of links, entities, etc.. to be a aligned.
Regards,
Mauro
>
> >
> > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > ---
> > include/uapi/linux/media.h | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
> > index 6aac2f0..008d077 100644
> > --- a/include/uapi/linux/media.h
> > +++ b/include/uapi/linux/media.h
> > @@ -302,7 +302,7 @@ struct media_v2_entity {
> > __u32 id;
> > char name[64]; /* FIXME: move to a property? (RFC says so) */
> > __u32 function; /* Main function of the entity */
> > - __u16 reserved[12];
> > + __u32 reserved[14];
> > };
> >
> > /* Should match the specific fields at media_intf_devnode */
> > @@ -315,7 +315,7 @@ struct media_v2_interface {
> > __u32 id;
> > __u32 intf_type;
> > __u32 flags;
> > - __u32 reserved[9];
> > + __u32 reserved[13];
> >
> > union {
> > struct media_v2_intf_devnode devnode;
> > @@ -327,7 +327,7 @@ struct media_v2_pad {
> > __u32 id;
> > __u32 entity_id;
> > __u32 flags;
> > - __u16 reserved[9];
> > + __u32 reserved[5];
> > };
> >
> > struct media_v2_link {
> > @@ -335,7 +335,7 @@ struct media_v2_link {
> > __u32 source_id;
> > __u32 sink_id;
> > __u32 flags;
> > - __u32 reserved[5];
> > + __u32 reserved[4];
> > };
> >
> > struct media_v2_topology {
>
>
--
Thanks,
Mauro
next prev parent reply other threads:[~2016-02-22 10:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-21 21:36 [RFC 0/4] MC v2 cleanups Sakari Ailus
2016-02-21 21:36 ` [RFC 1/4] media: Sanitise the reserved fields of the G_TOPOLOGY IOCTL arguments Sakari Ailus
2016-02-22 9:58 ` Mauro Carvalho Chehab
2016-02-22 10:00 ` Mauro Carvalho Chehab
2016-02-22 10:23 ` Mauro Carvalho Chehab [this message]
2016-02-22 19:52 ` Sakari Ailus
2016-02-21 21:36 ` [RFC 2/4] media: Rearrange the fields in the G_TOPOLOGY IOCTL argument Sakari Ailus
2016-02-22 9:54 ` Mauro Carvalho Chehab
2016-02-21 21:36 ` [RFC 3/4] media: Properly handle user pointers Sakari Ailus
2016-02-22 13:28 ` Laurent Pinchart
2016-02-21 21:36 ` [RFC 4/4] media: Drop media_get_uptr() macro Sakari Ailus
2016-02-22 9:52 ` Mauro Carvalho Chehab
2016-02-22 10:06 ` Sakari Ailus
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=20160222072321.382b235d@recife.lan \
--to=mchehab@osg.samsung.com \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=sakari.ailus@linux.intel.com \
--cc=shuahkh@osg.samsung.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox