Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp22341572ybl; Tue, 7 Jan 2020 00:23:04 -0800 (PST) X-Google-Smtp-Source: APXvYqwtoyv02mj+HzDbOcNP7MRxemcv4DgrANIPSYc13ijo5ct7myEKib4QibgSTpxutGiL4ps5 X-Received: by 2002:a05:6830:1555:: with SMTP id l21mr112086018otp.41.1578385384251; Tue, 07 Jan 2020 00:23:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578385384; cv=none; d=google.com; s=arc-20160816; b=OgE2O0evcJjRONx4Eq8DdI9IbPIFpi0isn1ujl4qmUxLOjl1iDjw+UEYXdzOZpyhoe TkdskeKOiI39WAOwp6KcvaT4vkUCZVO+ZZG8eAcTPkM8vKQkaWiqh89S0Q0CSDYvEVSo i2RCRPGPTxgyQAGjgA9ARUcNbfvUxexHDBxhs7BGi5yuMAzoKA4H50qOuynKfkoyQ2m/ HxcoM93kDvLkiBQ0ZxxNkoMEGyURID/SPwOgRmKSZMaiB7V73Em+bAYCJOIYu46NuZEw vv+XWeqMmEg0Tj+vIW/ieJHC30OK244WrRl7DvQZcTciFqM4vIowOFzGg48ePAOQqDB5 wQbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:content-transfer-encoding :mime-version:references:in-reply-to:user-agent:date:message-id:from; bh=pB4ocrAhCzD5f/F/pKGjRGumqBtgBWtSZrndm1LrLgg=; b=gMw3LxkN4EAhYUSwwJ17sIUWze4CyPV9C2kCkN64fU3Y7V8UTH/WGrPDrFXHtBtdAU /q5vuCcZVBn6fmY9dbGaKnILK66qH7tQM9Gn6tYuebZZYp3sL2t9rAoii0Fyh2f4uesM o+t3mQAbvhF3sANSPJoBEXfmAy7PXTdPdMO56fTHE50Ba3L6WuxOaF1bcAOX1UDip31d e3vIUmdbDFmDio8B0KHrqHV/fb7mJkiod8Idm9pMEMrSf7YRFT4Bsx9TrtYlXYU3qLn0 RQCmg7zhbiu3Bfpi+qlZgUrbdvU7kzlzCAi2LFWaXaGSo8N21CuIvgoAUEPzGCKFEBsH yOGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si36992480otp.316.2020.01.07.00.22.51; Tue, 07 Jan 2020 00:23:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727281AbgAGIVQ convert rfc822-to-8bit (ORCPT + 99 others); Tue, 7 Jan 2020 03:21:16 -0500 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 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: 8BIT Subject: Re: [PATCH v3 02/22] compat: provide compat_ptr() on all architectures 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ,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.