Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10708149rwp; Fri, 21 Jul 2023 03:51:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlHrfHLtxerfxWOlWEhYOgXYcKUHHhYTJ4CulcVKz1WFAcYWNjPQPRh4lJMyUY4WzLDZl2lZ X-Received: by 2002:a05:6a00:1490:b0:67a:a906:9edb with SMTP id v16-20020a056a00149000b0067aa9069edbmr1966810pfu.30.1689936670078; Fri, 21 Jul 2023 03:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689936670; cv=none; d=google.com; s=arc-20160816; b=dBVWePdLGRKds2WikUGUVUmkG/Go62bfFsIH9uIT55Ma2nWx54B5XlaEvQjKvg01YH iLpcfXXVXfroH3nuIuMWWLsogNPa7zcIgKxMR6n9mLoQHyVzcojoy+U8FrEqpNMDG8tP tB49n40KWWEfH9bWwGxmAz1t/8qcHj2jpOteaiBgdbFJyoWEX+bzGvMA4tIr/SzuRnw1 oAocIIKufhNnmXHeoRlC0JBrJYjztnlVVK2DnIGp+wg34iJNUXuMNoiQQcM1/bqvEO9i wCSocaDN2ZD5q9YJC0xpVm7gTiO0dX3lif1NrqD8T+c+OcO1tZKZwLHs5ypf5eX88b+O o87A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=T4vcdswTPKbk3jdCFUwEAFxzztwYDN+Xb3HcqKpgvUw=; fh=cftSorKSx6twlVWrRpN/qwNRhJS+5a/ALMx6gaeFNWQ=; b=oHrDZxtGSi7RpNwiQ0Vn1pQRE/zoxFF/Lnq26CvwznTzFXmQfKrihXMrImD3S++4Vu VOzgnoDcJq/oAsWCZzBGD37hc9H9r3speDUd5SB4vT89PSfdh/YxyegIWdxvApfneJhp RBDs88C1aXAbSNcccKASQsC/M5qWi+KuSxHM4upf/sLRbuZ7Z33PVp+P5PyALOgExLHd p+owEq7DR6MYIyJVbmG0uWlB8b2fOdcQbbtFD3Lxn+aJY1g6Js68p1ggVoNV+G6K98jJ LYLbp1XIfTTsusWNP2AfkZA+EDQ3p+jNpGOQWENnBZnyItX7IHewanS6ZjjWosNG0lIh W+9Q== 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=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cu11-20020a056a00448b00b0066891ffdfd5si2714708pfb.358.2023.07.21.03.50.57; Fri, 21 Jul 2023 03:51:10 -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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231490AbjGUKP2 (ORCPT + 99 others); Fri, 21 Jul 2023 06:15:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231419AbjGUKOr (ORCPT ); Fri, 21 Jul 2023 06:14:47 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CEA7F2D58; Fri, 21 Jul 2023 03:14:45 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A60992F4; Fri, 21 Jul 2023 03:15:28 -0700 (PDT) Received: from [10.57.64.194] (unknown [10.57.64.194]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7D5473F738; Fri, 21 Jul 2023 03:14:44 -0700 (PDT) Message-ID: Date: Fri, 21 Jul 2023 11:14:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v5 01/38] minmax: Add in_range() macro To: "Matthew Wilcox (Oracle)" , Andrew Morton Cc: linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20230710204339.3554919-1-willy@infradead.org> <20230710204339.3554919-2-willy@infradead.org> From: Ryan Roberts In-Reply-To: <20230710204339.3554919-2-willy@infradead.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,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 On 10/07/2023 21:43, Matthew Wilcox (Oracle) wrote: > Determine if a value lies within a range more efficiently (subtraction + > comparison vs two comparisons and an AND). It also has useful (under > some circumstances) behaviour if the range exceeds the maximum value of > the type. Sorry it's taken me a while to looking at this. I'm getting a lot of warnings about in_range() being redefined when building arm64 (defconfig-ish) with this patch set on top of v6.5-rc2. Looks like there are multiple existing implementations. Thanks, Ryan