On Tuesday 08 December 2015 17:23:40 Mauro Carvalho Chehab wrote: > > > + > > > +struct media_v2_topology { > > > + __u32 topology_version; > > > + > > > + __u32 num_entities; > > > + struct media_v2_entity *entities; > > > > The kernel seems to be moving to using __u64 instead of pointers in > > userspace- > > facing structures to avoid compat32 code. > > We had such discussion at the MC summit. I don't object to change to > __u64, but we need to reach a consensus >
Just saw the email fly by. Using a __u64 to pass a pointer is generally the preferred method for most subsystems these days. However, that means you probably want to extract the pointer from that using something like static inline void __user *get_upointer(u64 arg) { return (void __user *)(uintptr_t)arg; } This is the only way that I know that works on both 32-bit and 64-bit architectures as well as the oddball s390 compat mode (which you don't care about because there are no media devices on s390). Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html