Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3563639pxp; Wed, 23 Mar 2022 00:49:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAoBfO2DpWwpd3owJmONF26UWrJY/2rFZAFfe9UXXGlOdKepzgaEurmm3Q2BU72Y61sWdT X-Received: by 2002:a17:902:ed82:b0:153:85d5:7dff with SMTP id e2-20020a170902ed8200b0015385d57dffmr22285365plj.79.1648021795476; Wed, 23 Mar 2022 00:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648021795; cv=none; d=google.com; s=arc-20160816; b=B/ByEn+gINdGy6O6F2wS4+05mX64QkQCcxNwBJXb+3OAVPZqZdtn1JD3x5L8kJ11jB QrYmdhh+C6fApFKLYDRWXD1Id9X8dKU+u2JDeKWqY1X73DtmZRxC3lpE3LTAejRmUeQD w99mS35cGtP+7y0N9f7XVn6n+qBtTEMlLRlRa/CQW8UPsrIOZ7AtsODy0lXsHkpNnr7x AnwCbbYMLnHBtWkEIh5rhAGsW3wx6Qgvrua4Fqr8lZ1LLaKl8kjoV1zx9AZTyY/XKOHQ hs1iKC2GWlHJYLSVXIYHkRw16uCBr1HwIeRbSHA2RSJbplXTqI3PcUGvsctgJe3jTQ8j QkdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=Q6H3uXNL3isGDw1CLVHZyJnsK1z5sRj9nYqKq+iiTqQ=; b=fDDDMvrOvY74X6H2pldIHo/DJupZj9ZoPMQ6HoRU1VtEq0oMTpQEtC8cTbDQfnJ7TB eW2Ct3w8Wb3itaNYwDg+RXLxj9OY5L8QmtPlYXqMRVHv1awsGIrr5SgNecY7U8hsPisN D1MNVQ7896R8Ta1HQhkHsgKJ7f81ros1rF/W7gYSYvwyBsr8DFwHlDqAV7bLBSr5Av8W Fp4zADbxOnbR24NswE6klBr4sK+96tozxaSo/iTdtktHP3ZjGNs4G5tl3X19IV0/WCEO fL91jFt3Rdc2WTiZAEM0mZcre2CjBDNH4SWf893UNKMWGj8QOK/w4i65syc03QZdwTU7 17yg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a63e20a000000b003816043f136si18070803pgh.811.2022.03.23.00.49.43; Wed, 23 Mar 2022 00:49:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237971AbiCVW3k convert rfc822-to-8bit (ORCPT + 99 others); Tue, 22 Mar 2022 18:29:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbiCVW3d (ORCPT ); Tue, 22 Mar 2022 18:29:33 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 35A973878A for ; Tue, 22 Mar 2022 15:28:02 -0700 (PDT) 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-62-EXb9IYMXOCiR4--bAPJEbQ-1; Tue, 22 Mar 2022 22:27:59 +0000 X-MC-Unique: EXb9IYMXOCiR4--bAPJEbQ-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.32; Tue, 22 Mar 2022 22:27:58 +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.033; Tue, 22 Mar 2022 22:27:58 +0000 From: David Laight To: 'Jakub Kicinski' CC: 'Alexander Lobakin' , 'Wan Jiabing' , Jesse Brandeburg , "Tony Nguyen" , "David S. Miller" , Paolo Abeni , "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2] ice: use min_t() to make code cleaner in ice_gnss Thread-Topic: [PATCH v2] ice: use min_t() to make code cleaner in ice_gnss Thread-Index: AQHYPSxszwX/VYzTWUmJ1ZXJKTtOx6zJ/3twgAGw2QCAAAVpMIAABOQAgABC8EA= Date: Tue, 22 Mar 2022 22:27:58 +0000 Message-ID: References: <20220321135947.378250-1-wanjiabing@vivo.com> <20220322175038.2691665-1-alexandr.lobakin@intel.com> <20220322112730.482d674d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20220322112730.482d674d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> 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 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jakub Kicinski > Sent: 22 March 2022 18:28 > > On Tue, 22 Mar 2022 18:12:08 +0000 David Laight wrote: > > > > Oh FFS why is that u16? > > > > Don't do arithmetic on anything smaller than 'int' > > > > > > Any reasoning? I don't say it's good or bad, just want to hear your > > > arguments (disasms, perf and object code measurements) etc. > > > > Look at the object code on anything except x86. > > The compiler has to add instruction to mask the value > > (which is in a full sized register) down to 16 bits > > after every arithmetic operation. > > Isn't it also slower on some modern x86 CPUs? > I could have sworn someone mentioned that in the past. Not in the cpu clock count tables I've read. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)