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 F2878CA0FF8 for ; Tue, 5 Sep 2023 16:34:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344964AbjIEQey convert rfc822-to-8bit (ORCPT ); Tue, 5 Sep 2023 12:34:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354096AbjIEJgr (ORCPT ); Tue, 5 Sep 2023 05:36:47 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57A041AE for ; Tue, 5 Sep 2023 02:36:41 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mtapsc-5-RE-OIzy8PuGpYbXqCyuTRw-1; Tue, 05 Sep 2023 10:36:38 +0100 X-MC-Unique: RE-OIzy8PuGpYbXqCyuTRw-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 5 Sep 2023 10:36:34 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Tue, 5 Sep 2023 10:36:34 +0100 From: David Laight To: 'Breno Leitao' , "sdf@google.com" , "axboe@kernel.dk" , "asml.silence@gmail.com" , "willemdebruijn.kernel@gmail.com" , "martin.lau@linux.dev" , "krisman@suse.de" , "Alexei Starovoitov" , Daniel Borkmann , "Andrii Nakryiko" , Song Liu , Yonghong Song , John Fastabend , "KP Singh" , Hao Luo , Jiri Olsa , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni CC: "bpf@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "io-uring@vger.kernel.org" , Kuniyuki Iwashima , "Alexander Mikhalitsyn" , Xin Long , "David Howells" , Jason Xing , "Andy Shevchenko" Subject: RE: [PATCH v4 04/10] net/socket: Break down __sys_getsockopt Thread-Topic: [PATCH v4 04/10] net/socket: Break down __sys_getsockopt Thread-Index: AQHZ30xphJKGpfy/Z06Weh22EiUUErAL+aYg Date: Tue, 5 Sep 2023 09:36:34 +0000 Message-ID: References: <20230904162504.1356068-1-leitao@debian.org> <20230904162504.1356068-5-leitao@debian.org> In-Reply-To: <20230904162504.1356068-5-leitao@debian.org> 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 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: io-uring@vger.kernel.org From: Breno Leitao > Sent: 04 September 2023 17:25 > > Split __sys_getsockopt() into two functions by removing the core > logic into a sub-function (do_sock_getsockopt()). This will avoid > code duplication when doing the same operation in other callers, for > instance. Although a lot more work, I think (others may disagree) that the internal getsockopt() functions should be changed to take the length as a parameter and return the positive value to write back. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)