From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MIME_QP_LONG_LINE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B1CAC33C99 for ; Tue, 7 Jan 2020 08:22:31 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 554052077B for ; Tue, 7 Jan 2020 08:22:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 554052077B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=zytor.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47sQNP1VbpzDqLM for ; Tue, 7 Jan 2020 19:22:29 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=zytor.com (client-ip=198.137.202.136; helo=mail.zytor.com; envelope-from=hpa@zytor.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=zytor.com Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47sQLP2W7BzDqHx for ; Tue, 7 Jan 2020 19:20:45 +1100 (AEDT) Received: from [IPv6:2601:646:8600:3281:c17a:5ef:6afe:4c48] ([IPv6:2601:646:8600:3281:c17a:5ef:6afe:4c48]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id 0078K3ZN3264752 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 7 Jan 2020 00:20:03 -0800 Authentication-Results: mail.zytor.com; dkim=permerror (bad message/signature format) From: "H. Peter Anvin" Message-Id: <202001070820.0078K3ZN3264752@mail.zytor.com> Date: Tue, 07 Jan 2020 00:19:53 -0800 User-Agent: K-9 Mail for Android 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: quoted-printable Subject: Re: [PATCH v3 02/22] compat: provide compat_ptr() on all architectures To: Arnd Bergmann , Michael Ellerman X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Carstens , "open list:BROADCOM NVRAM DRIVER" , "James E.J. Bottomley" , Paul Mackerras , Will Deacon , Paul Burton , Helge Deller , the arch/x86 maintainers , Christian Borntraeger , Ingo Molnar , Catalin Marinas , James Hogan , linuxppc-dev@zytor.com, Robert Richter , Vasily Gorbik , "James E.J. Bottomley" , Borislav Petkov , Thomas Gleixner , Parisc List , "Martin K. Petersen" , "linux-kernel@vger.kernel.org" , Ralf Baechle , "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" ,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=2E I just moved it here and kept the >definition=2E > > Arnd Did compat_uptr_t exist back then? --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E