From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: mchehab@osg.samsung.com, hverkuil@xs4all.nl,
shuahkh@osg.samsung.com, laurent.pinchart@ideasonboard.com,
Sakari Ailus <sakari.ailus@iki.fi>
Subject: [RFC 2/4] media: Rearrange the fields in the G_TOPOLOGY IOCTL argument
Date: Sun, 21 Feb 2016 23:36:13 +0200 [thread overview]
Message-ID: <1456090575-28354-3-git-send-email-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <1456090575-28354-1-git-send-email-sakari.ailus@linux.intel.com>
From: Sakari Ailus <sakari.ailus@iki.fi>
This avoids having multiple reserved fields in the struct. Reserved fields
are added in order to align the struct size to a power of two as well.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
include/uapi/linux/media.h | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 008d077..77a95db 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -341,21 +341,16 @@ struct media_v2_link {
struct media_v2_topology {
__u64 topology_version;
- __u32 num_entities;
- __u32 reserved1;
__u64 ptr_entities;
-
- __u32 num_interfaces;
- __u32 reserved2;
__u64 ptr_interfaces;
-
- __u32 num_pads;
- __u32 reserved3;
__u64 ptr_pads;
+ __u64 ptr_links;
+ __u32 num_entities;
+ __u32 num_interfaces;
+ __u32 num_pads;
__u32 num_links;
- __u32 reserved4;
- __u64 ptr_links;
+ __u32 reserved[18];
};
static inline void __user *media_get_uptr(__u64 arg)
--
2.1.4
next prev parent reply other threads:[~2016-02-21 21:36 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
2016-02-22 19:52 ` Sakari Ailus
2016-02-21 21:36 ` Sakari Ailus [this message]
2016-02-22 9:54 ` [RFC 2/4] media: Rearrange the fields in the G_TOPOLOGY IOCTL argument 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=1456090575-28354-3-git-send-email-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=sakari.ailus@iki.fi \
--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