From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Laight Date: Mon, 7 Feb 2022 17:14:43 +0000 Subject: [OpenRISC] [PATCH] openrisc: remove CONFIG_SET_FS In-Reply-To: References: <20220206013648.3491865-1-shorne@gmail.com> Message-ID: <3744dcbbf2874875b023548aacdd8b41@AcuMS.aculab.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org From: Christoph Hellwig > Sent: 07 February 2022 06:45 > > On Sun, Feb 06, 2022 at 10:36:47AM +0900, Stafford Horne wrote: > > Remove the address space override API set_fs() used for User Mode Linux. > > This ain't UML :) > > > + return size <= TASK_SIZE && addr <= (TASK_SIZE - size); > > No need for the inner braces. Since TASK_SIZE is actually an address wouldn't be better to swap the condition around (in every architecture). return addr <= TASK_SIZE && size <= TASK_SIZE - addr; David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94744C433F5 for ; Mon, 7 Feb 2022 17:24:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240054AbiBGRXA convert rfc822-to-8bit (ORCPT ); Mon, 7 Feb 2022 12:23:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382714AbiBGROu (ORCPT ); Mon, 7 Feb 2022 12:14:50 -0500 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 13295C0401D5 for ; Mon, 7 Feb 2022 09:14:48 -0800 (PST) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-261-OsvrFIUnMKKFrChEQsxdNA-1; Mon, 07 Feb 2022 17:14:46 +0000 X-MC-Unique: OsvrFIUnMKKFrChEQsxdNA-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Mon, 7 Feb 2022 17:14:43 +0000 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.028; Mon, 7 Feb 2022 17:14:43 +0000 From: David Laight To: 'Christoph Hellwig' , Stafford Horne CC: LKML , Arnd Bergmann , "Jonas Bonn" , Stefan Kristiansson , Randy Dunlap , "openrisc@lists.librecores.org" Subject: RE: [PATCH] openrisc: remove CONFIG_SET_FS Thread-Topic: [PATCH] openrisc: remove CONFIG_SET_FS Thread-Index: AQHYG/BjkR+ecsCi7UOyp98rZRODA6yIU2uA Date: Mon, 7 Feb 2022 17:14:43 +0000 Message-ID: <3744dcbbf2874875b023548aacdd8b41@AcuMS.aculab.com> References: <20220206013648.3491865-1-shorne@gmail.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig > Sent: 07 February 2022 06:45 > > On Sun, Feb 06, 2022 at 10:36:47AM +0900, Stafford Horne wrote: > > Remove the address space override API set_fs() used for User Mode Linux. > > This ain't UML :) > > > + return size <= TASK_SIZE && addr <= (TASK_SIZE - size); > > No need for the inner braces. Since TASK_SIZE is actually an address wouldn't be better to swap the condition around (in every architecture). return addr <= TASK_SIZE && size <= TASK_SIZE - addr; David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)