Linus Torvalds writes: (Summary) wrote:
Ok, I'm not entirely happy with this.
Ok, I'm not entirely happy with this.
I don't think the mangle/demangle_poll() stuff should be in the uapi headers, and it really worries me that we use the same names - with
[...]
the annotations through the tree.Ok, I'm not entirely happy with this.
Ok, I'm not entirely happy with this.
I don't think the mangle/demangle_poll() stuff should be in the uapi headers, and it really worries me that we use the same names - with
different values - for the kernel and user versions of the POLLxyz macros. That could make the mangling be automated too, ie assuming gcc gets it right, maybe done with #define pollmask_to_kernel(uval, UMASK, KMASK) \ ((force __poll_t)(((uval)&UMASK)/UMASK*KMASK)) static inline __poll_t unmangle_poll(unsigned int uval) { return pollmask_to_kernel(uval, POLLIN, KPOLLIN) |