[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-18 Thread Daniel Vetter
On Thu, Mar 17, 2016 at 02:33:50PM -0700, Joe Perches wrote: > On Thu, 2016-03-17 at 18:19 -0300, Gustavo Padovan wrote: > > 2016-03-17 Joe Perches : > > > On Thu, 2016-03-17 at 16:50 -0400, Rob Clark wrote: > > > > On Thu, Mar 17, 2016 at 4:40 PM, Joe Perches wrote: > > > [] > > > > > It's a

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Gustavo Padovan
2016-03-17 Joe Perches : > On Thu, 2016-03-17 at 18:19 -0300, Gustavo Padovan wrote: > > 2016-03-17 Joe Perches : > > > On Thu, 2016-03-17 at 16:50 -0400, Rob Clark wrote: > > > > On Thu, Mar 17, 2016 at 4:40 PM, Joe Perches wrote: > > > [] > > > > > It's a name that seems like it should be a

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Gustavo Padovan
2016-03-17 Joe Perches : > On Thu, 2016-03-17 at 16:50 -0400, Rob Clark wrote: > > On Thu, Mar 17, 2016 at 4:40 PM, Joe Perches wrote: > [] > > > It's a name that seems like it should be a straightforward > > > cast of a kernel pointer to a __user pointer like: > > > > > > static inline void

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Rob Clark
On Thu, Mar 17, 2016 at 5:19 PM, Gustavo Padovan wrote: > 2016-03-17 Joe Perches : > >> On Thu, 2016-03-17 at 16:50 -0400, Rob Clark wrote: >> > On Thu, Mar 17, 2016 at 4:40 PM, Joe Perches wrote: >> [] >> > > It's a name that seems like it should be a straightforward >> > > cast of a kernel

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Rob Clark
On Thu, Mar 17, 2016 at 4:40 PM, Joe Perches wrote: > On Thu, 2016-03-17 at 16:33 -0400, Rob Clark wrote: >> On Thu, Mar 17, 2016 at 4:22 PM, Joe Perches wrote: >> > On Thu, 2016-03-17 at 15:43 -0300, Gustavo Padovan wrote: >> > > 2016-03-17 Gustavo Padovan : >> > > > 2016-03-17 Joe Perches : >>

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Rob Clark
On Thu, Mar 17, 2016 at 4:22 PM, Joe Perches wrote: > On Thu, 2016-03-17 at 15:43 -0300, Gustavo Padovan wrote: >> 2016-03-17 Gustavo Padovan : >> > 2016-03-17 Joe Perches : >> > > On Thu, 2016-03-17 at 14:30 -0300, Gustavo Padovan wrote: >> > > > >> > > > This function had copies in 3 different

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Gustavo Padovan
2016-03-17 Gustavo Padovan : > 2016-03-17 Joe Perches : > > > On Thu, 2016-03-17 at 14:30 -0300, Gustavo Padovan wrote: > > > This function had copies in 3 different files. Unify them in > > > kernel.h. > > > > This is only used by gpu/drm. > > > > I think this is a poor name for a generic

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Gustavo Padovan
2016-03-17 Joe Perches : > On Thu, 2016-03-17 at 14:30 -0300, Gustavo Padovan wrote: > > This function had copies in 3 different files. Unify them in > > kernel.h. > > This is only used by gpu/drm. > > I think this is a poor name for a generic function > that would be in kernel.h. > > Isn't

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Joe Perches
On Thu, 2016-03-17 at 18:19 -0300, Gustavo Padovan wrote: > 2016-03-17 Joe Perches : > > On Thu, 2016-03-17 at 16:50 -0400, Rob Clark wrote: > > > On Thu, Mar 17, 2016 at 4:40 PM, Joe Perches wrote: > > [] > > > > It's a name that seems like it should be a straightforward > > > > cast of a kernel

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Gustavo Padovan
From: Gustavo Padovan This function had copies in 3 different files. Unify them in kernel.h. Cc: Andrew Morton Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 5 -

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Joe Perches
On Thu, 2016-03-17 at 16:50 -0400, Rob Clark wrote: > On Thu, Mar 17, 2016 at 4:40 PM, Joe Perches wrote: [] > > It's a name that seems like it should be a straightforward > > cast of a kernel pointer to a __user pointer like: > > > > static inline void __user *to_user_ptr(void *p) > > { > >   

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Joe Perches
On Thu, 2016-03-17 at 16:33 -0400, Rob Clark wrote: > On Thu, Mar 17, 2016 at 4:22 PM, Joe Perches wrote: > > On Thu, 2016-03-17 at 15:43 -0300, Gustavo Padovan wrote: > > > 2016-03-17 Gustavo Padovan : > > > > 2016-03-17 Joe Perches : > > > > > On Thu, 2016-03-17 at 14:30 -0300, Gustavo Padovan

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Joe Perches
On Thu, 2016-03-17 at 15:43 -0300, Gustavo Padovan wrote: > 2016-03-17 Gustavo Padovan : > > 2016-03-17 Joe Perches : > > > On Thu, 2016-03-17 at 14:30 -0300, Gustavo Padovan wrote: > > > > > > > > This function had copies in 3 different files. Unify them in > > > > kernel.h. > > > This is only

[PATCH v9 2/3] kernel.h: add to_user_ptr()

2016-03-17 Thread Joe Perches
On Thu, 2016-03-17 at 14:30 -0300, Gustavo Padovan wrote: > This function had copies in 3 different files. Unify them in > kernel.h. This is only used by gpu/drm. I think this is a poor name for a generic function that would be in kernel.h. Isn't there an include file in linux/drm that's