From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from terminus.zytor.com ([198.137.202.136]:44923 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726485AbgAGIVQ (ORCPT ); Tue, 7 Jan 2020 03:21:16 -0500 From: "H. Peter Anvin" Message-Id: <202001070820.0078K3ZN3264752@mail.zytor.com> Date: Tue, 07 Jan 2020 00:19:53 -0800 In-Reply-To: References: <20200102145552.1853992-1-arnd@arndb.de> <20200102145552.1853992-3-arnd@arndb.de> <87woa410nx.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH v3 02/22] compat: provide compat_ptr() on all architectures Sender: linux-s390-owner@vger.kernel.org List-ID: To: Arnd Bergmann , Michael Ellerman Cc: "James E.J. Bottomley" , "Martin K. Petersen" , Catalin Marinas , Will Deacon , Ralf Baechle , Paul Burton , James Hogan , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Robert Richter , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , the arch/x86 maintainers , "linux-kernel@vger.kernel.org" , "open list:BROADCOM NVRAM DRIVER" , Parisc List , linuxppc-dev@zytor.com ,oprofile-list@lists.sf.net,linux-s390 ,sparclinux From: hpa@zytor.com Message-ID: <41625F06-D755-4C82-86DF-A9415FEEE13D@zytor.com> On January 7, 2020 12:08:31 AM PST, Arnd Bergmann wrote: >On Tue, Jan 7, 2020 at 3:05 AM Michael Ellerman >wrote: >> Arnd Bergmann 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.