On Tue, 21 Jul 2015 23:06:13 +0900,
David Howells wrote:
> 
> Yoshinori Sato <ys...@users.sourceforge.jp> wrote:
> 
> >  #define get_user(x, ptr)                                   \
> >  ({                                                         \
> > +   uintptr_t __uip = (uintptr_t)(ptr);                     \
> 
> const?

OK.

> >     might_fault();                                          \
> > -   access_ok(VERIFY_READ, ptr, sizeof(*ptr)) ?             \
> > -           __get_user(x, ptr) :                            \
> > +   access_ok(VERIFY_READ, __uip, sizeof(*ptr)) ?           \
> > +           __get_user((x), (__typeof__(*ptr) *)__uip) :    \
> >             -EFAULT;                                        \
> >  })
> 
> Would it be better to use void* instead of uintptr_t?

No reason.
I'll changed void*

Thanks.

> David

-- 
Yoshinori Sato
<ys...@users.sourceforge.jp>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to