Re: [PATCH v3 02/22] compat: provide compat_ptr() on all architectures
"H. Peter Anvin" <[email protected]> Tue, 07 Jan 2020 00:19:53 -0800
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <202001070820.0078K3ZN3264752__17611.2615548604$1578402963$gmane$org@mail.zytor.com> |
<[email protected]>,[email protected],linux-s390 <[email protected]>,sparclinux <[email protected]> From: [email protected] Message-ID: <[email protected]> On January 7, 2020 12:08:31 AM PST, Arnd Bergmann <[email protected]> wrote: >On Tue, Jan 7, 2020 at 3:05 AM Michael Ellerman <[email protected]> >wrote: >> Arnd Bergmann <[email protected]> writes: >> > + >> > +static inline compat_uptr_t ptr_to_compat(void __user *uptr) >> > +{ >> > + return (u32)(unsigned long)uptr; >> > +} >> >> Is there a reason we cast to u32 directly instead of using >compat_uptr_t? > >Probably Al found this to be more explicit at the time when he >introduced >it on all the architectures in 2005. I just moved it here and kept the >definition. > > Arnd Did compat_uptr_t exist back then? -- Sent from my Android device with K-9 Mail. Please excuse my brevity.