Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp22332833ybl; Tue, 7 Jan 2020 00:09:53 -0800 (PST) X-Google-Smtp-Source: APXvYqzF0jXKiUOVxk/4TmJk4b5ztg5dnR8XT0I1MdStuM3xFul0xfvZ5gXkOwzFJpsOCiVccmGP X-Received: by 2002:a9d:4e99:: with SMTP id v25mr124104634otk.363.1578384593005; Tue, 07 Jan 2020 00:09:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578384592; cv=none; d=google.com; s=arc-20160816; b=TkZ9D2ahO1CIxdVX97p+kWFwVLYjPgx8PIFohcQJxNlanp0BAI3vuGX0OlBwq9Wu7C PbKF3CmgYjxqKApDbiMizVqkYODKHdCf6ZopxVvhSFdMi3M0++njUznzmXBeGs/VusjD OZ9fjB8sp/tlLxw22nmxMNpC3PU18wiuAKg1myg+nh1k5p6ZGzj6BRDLxO/pMK9eW3uO E5XRFtF6qlNjTd4pKwm35Z56zjRYfgd2uA9H1X06kKoBTK83M+muc74PcHumYIn69TZV ETq26F69VeAJeJk/dkXhQVdQhi5ZoHJYbxRUJP907fn275lkJpVeG11eg5Uq1djJAItV tqXA== 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:message-id:date:from :in-reply-to:references:mime-version; bh=Vpt3sIBhdxGi8MPETH2WjtJmB8FCoMGe/59w/aO73jA=; b=h1Ru/lpX+NlOyiF4yqMKgJJAg5AHx0xXlirvAxigi0IuxOCNewV9Mhc7SjJL6+Ty1S uYHPcd4GosKulZay2K/ibzfjKIHwIqI/4oSGzO6tNl6tdoQzZrtC7yplt45i6pVFnXwt f4y1RWz8S7GP3KXqqGm5SwBdDuOEwz1plHBAtCDtbL7WM/i8tzKVCpP1ubLfvu4jolLT 1P7zm+bHiLF24oCyBkIcHf8mFV1u2sakflMya5XI6RYTn0CdAP8WsvLGLeaSgTLL3cvi UWUMhIWBuhDhFNQ2J4RYJf8zArq+xyj5WuZQU0XBFgUOuPxP+UdKs9cuntLHZGVThQSM Sqxw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si36886463otp.5.2020.01.07.00.09.39; Tue, 07 Jan 2020 00:09:52 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727347AbgAGIIx (ORCPT + 99 others); Tue, 7 Jan 2020 03:08:53 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:55497 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725987AbgAGIIw (ORCPT ); Tue, 7 Jan 2020 03:08:52 -0500 Received: from mail-qt1-f175.google.com ([209.85.160.175]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPSA (Nemesis) id 1N6sWd-1jm0Pl0TMt-018JGf; Tue, 07 Jan 2020 09:08:50 +0100 Received: by mail-qt1-f175.google.com with SMTP id e5so44660877qtm.6; Tue, 07 Jan 2020 00:08:49 -0800 (PST) X-Gm-Message-State: APjAAAXZVLKoIgieSnbamSeHMGHIeVRIQFB3wX+QUJETQz+lyMHHRpyC nUf0/zXFuFC0t5NlcR2Ro60hkBjs1I53HxYATtQ= X-Received: by 2002:ac8:709a:: with SMTP id y26mr78377768qto.304.1578384528657; Tue, 07 Jan 2020 00:08:48 -0800 (PST) MIME-Version: 1.0 References: <20200102145552.1853992-1-arnd@arndb.de> <20200102145552.1853992-3-arnd@arndb.de> <87woa410nx.fsf@mpe.ellerman.id.au> In-Reply-To: <87woa410nx.fsf@mpe.ellerman.id.au> From: Arnd Bergmann Date: Tue, 7 Jan 2020 09:08:31 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 02/22] compat: provide compat_ptr() on all architectures To: 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 , "H. Peter Anvin" , "the arch/x86 maintainers" , "linux-kernel@vger.kernel.org" , "open list:BROADCOM NVRAM DRIVER" , Parisc List , linuxppc-dev , oprofile-list@lists.sf.net, linux-s390 , sparclinux Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:u23tS7WXorWpVLZKGkb7wugjrH1eotKatfDmqpeBl6DRIJJ7iUP nq7sblEIf6wgOdnV9kEk/0s0PpDAlTXPsPIDWUt3vJX7VL0N4G5lnnm6/oAqr6M5uybdriY hZavjT+r7xsftIZsikilYIa7XtS5hp/HvR8AEMn6HO+TPBoq5+lzpfwXmdG/Z7oHcyc8V4x idDM1/uyjPQZKR/M0qCZg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:gOlwlytu5DE=:WL7dOW6AXXvH35CqloA4bv QGlptwqJMJvCrD8JlpA6oQTcVGb4gyg+XE65d++c6tv2gEK2xdcTZuS7MyxD9e6ppV0Mp7Y6A E8C+IB3/TJUJNGYsKOKj//zs10JHmhYiTdsqjKKww0AWT0TyN+dVwQjDJr3/GWiGjPxQeQlL8 ZJpRyTua64cMiFMMWtvxqOHN2432G5SY8veyvQIiUmHEyZFue69wfZEVgkRQIdZBj6NchzqFD bIrZJwEqncm0h2zZ+gpx0GOzttKWeyob1mUkxrHCVyrudsElDIT9YI6D9OYWTs9h2dThBBVdC Cr9NNfCjlWVRBP48RPDO9VeJG3FpHkssJAR44N0kLAU5VPxYDZ9g1HPEuLTHv+eXURSu4DGPQ fqPgxdLxmO+RLmqN7iJeAPxaWxAO3HogkN3eDt2Fe11raPb9n8p2/StRXIq083NnmK9qiYv2J sq2vXgBtxNLjmziGQPvzgbJS5ukkiMRn8yxYdX297780aNpPLxvHgGoSoT5TSj9zh7waYHaed /aFFMUFZucoexUJ0pRszUbRACphrfvN/c69/KVSIphfgnfixUts48LexMk7lC51Pxi8OELkaY pJknxct4qAofB25UGi3fXxF62a9atRXgi1tKnzxWAAjGV/WLTU6qM4QyYXgEwHsIkLnOaLxXs KuofWrlvbUHXwKsrbbn7enIttBfLkkOy+WtWfs/PiMRl8QxwSZ5cXhwvqb004jOiA3qjO+G4w 0TFoMJlRuUl7IENTQwglNKJba0gBwPMZ+j3Z2/87eJQccjJrBId22m8u8ExcLGNR5CMQ0WaVu 3iz1fk5cYqv61OfBqFNLdNjmn/jc6fGaCX3HUr2n7EkPlld5iLjiKXakHy9taDGuNzoeHw019 wiREIyL7qOXxrk6MAqcg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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