From patchwork Wed May 24 03:12:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Zhang X-Patchwork-Id: 98268 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2574412vqo; Tue, 23 May 2023 20:47:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ajCFLNJeJnBPIjlY518/B7Zu4CvqTPqFGqhzzPHL+P5wQtsIOmAYFl7NMKkv3/pNJOdQv X-Received: by 2002:a05:6a20:258c:b0:10c:89cc:bc5f with SMTP id k12-20020a056a20258c00b0010c89ccbc5fmr4216425pzd.20.1684900033298; Tue, 23 May 2023 20:47:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684900033; cv=none; d=google.com; s=arc-20160816; b=ww6NMcnWkSdY47PpNuMwcKP6OCMF7dmZt6cAyvizDUu3vB68BYK1aQ4t7icJKXoEPh fkFtBXbouHUaArv/sz2XdaVPDCVZg8ypG3ukV+vT7wGArny7w8StTNDuydd+KJeJQCnR 7wflUBrxgHe5qDZfDeaMC2WGbwuoAVqSaRm6mlPpO54YqbUsdLAOtfo4rIKwTWXbsD16 i0OSzBav21J4aK6hofjknfn3JI7AXwgObXORAxoY3me4hG2W7wHoVBfDUuC4AawQNzSk wxgWSR4svY9FSuGAGQAnDb1j5KBT/fpnXb6JQxe94amgJV04jjAnJJXtfGepVchkcbYz RpZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RV+E10z6xFr5GObbzUS/AcEhnoCetH+fwSlbsSYX4vY=; b=UOkeEB4oqJxZ1fVlc6QJpisyMVWLyjptcVBECXr8QbZ2WQo43L9BI+4afYGZ/FPL8a 4rRcXoBz5HTpVyQsngpFsbHNekkJov7fSP2Wfr3PIyV4sAqulxGwh5EltYcJMaXxbFxH C523rV0j4awDEWZfKL8rOxL/V/Kg3smUUr2SOP4hAfeThF/q/6CR2zXTxStuSb9dYDsa tXIdiS1ye3Vbe7JBzg+gK6qN1YYYabc+O4zNjkkBYgzIv5exfZPYIMw60iPLbkKlUTfc Nh1WQVdlIAFiq7jYU2g5wgMQjIQhpG1SFpyW7WFuzVLv5fy+OWp8s60fBz3YfQ8E2e2m pbbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=UEqQJrMO; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j67-20020a636e46000000b0051b554df1c2si3609450pgc.497.2023.05.23.20.47.01; Tue, 23 May 2023 20:47:13 -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; dkim=pass header.i=@bytedance.com header.s=google header.b=UEqQJrMO; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239262AbjEXDOi (ORCPT + 99 others); Tue, 23 May 2023 23:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239122AbjEXDN7 (ORCPT ); Tue, 23 May 2023 23:13:59 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 621921A6 for ; Tue, 23 May 2023 20:13:42 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1ae3ed1b08eso4757405ad.0 for ; Tue, 23 May 2023 20:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1684898022; x=1687490022; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RV+E10z6xFr5GObbzUS/AcEhnoCetH+fwSlbsSYX4vY=; b=UEqQJrMOHnp7tNX7Xow0fq26n4UkOiUISE4M7Opa3LuKIvoS3dhJJ0pqVVo2SLlHs8 6Qqpy3Eu1Kk08CjhUGgaFUpgTvqwnToIT35Fuppg5a6SaiPtz0c9rGgD9iaXf7kGpKLf rS9jqrOV2UtKcs1SiOtf56rgGQlYwIsWsBR4Xu4CfUbv+ajxw8ISYMIaxeaBTW2NfEzq lJuSO+qkX1c3cciGzclkIICDlZENpzNmPSqJg/s1ju/BkYi7dKl6yvDfpV6sTU3bXc9x lKEvIzWQPS7ntNGuM+n1OvdBANoB8EPXON4tpuiZV7OO1lTc1VkCZZYlWibCcyZ+H9Vb 9dWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684898022; x=1687490022; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RV+E10z6xFr5GObbzUS/AcEhnoCetH+fwSlbsSYX4vY=; b=D0JyPYWID3h92F0X/2hJCx2NIAvnhyD/QnjtCWJxTgS7FbBFiKuZV4XpxdiyY7Wlbo 3h/STdmLCv3rSOBIPXx7VUTLz9/EouHp3CGAg3059pN2NMEzamMu3NNSMrZJyO+DJrFW lpgkk/nkJPik3Vn8mG586BedCc/1vU/uHsUu0TSNxzqGbpok588ZnbjFWcf4X6kod8tZ l+DU5QGP0k+SInLs5gDiIWJicAzKbtm/Aga+fdYhGcaXNxQ2jXJLbr7nebJqgmzmZqX+ OJwV+JdUyH7N6iOKk39OT9xH4GSzB5w1pnsH7AoTh7lIfRyGRmflffQxbD5OGfP7vm+f DCag== X-Gm-Message-State: AC+VfDwQ1wuVN1qWJPJK32CkzOy3MB+8DnGXOZhgYlxw9GZgAIv/XhKc EgWC7Kc34WVVyZt3WDpTvBnJjA== X-Received: by 2002:a17:902:c412:b0:1af:d00c:7f04 with SMTP id k18-20020a170902c41200b001afd00c7f04mr5042927plk.12.1684898021782; Tue, 23 May 2023 20:13:41 -0700 (PDT) Received: from GL4FX4PXWL.bytedance.net ([139.177.225.249]) by smtp.gmail.com with ESMTPSA id i4-20020a17090332c400b001ab061e352bsm7480769plr.195.2023.05.23.20.13.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 20:13:41 -0700 (PDT) From: Peng Zhang To: Liam.Howlett@oracle.com Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, Peng Zhang Subject: [PATCH v4 10/10] maple_tree: Relocate the declaration of mas_empty_area_rev(). Date: Wed, 24 May 2023 11:12:47 +0800 Message-Id: <20230524031247.65949-11-zhangpeng.00@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20230524031247.65949-1-zhangpeng.00@bytedance.com> References: <20230524031247.65949-1-zhangpeng.00@bytedance.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766745737373664738?= X-GMAIL-MSGID: =?utf-8?q?1766745737373664738?= Relocate the declaration of mas_empty_area_rev() so that mas_empty_area() and mas_empty_area_rev() are together. Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett --- include/linux/maple_tree.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h index 541675229568..295548cca8b3 100644 --- a/include/linux/maple_tree.h +++ b/include/linux/maple_tree.h @@ -474,6 +474,12 @@ void *mas_next_range(struct ma_state *mas, unsigned long max); int mas_empty_area(struct ma_state *mas, unsigned long min, unsigned long max, unsigned long size); +/* + * This finds an empty area from the highest address to the lowest. + * AKA "Topdown" version, + */ +int mas_empty_area_rev(struct ma_state *mas, unsigned long min, + unsigned long max, unsigned long size); static inline void mas_init(struct ma_state *mas, struct maple_tree *tree, unsigned long addr) @@ -497,12 +503,6 @@ static inline bool mas_is_paused(const struct ma_state *mas) return mas->node == MAS_PAUSE; } -/* - * This finds an empty area from the highest address to the lowest. - * AKA "Topdown" version, - */ -int mas_empty_area_rev(struct ma_state *mas, unsigned long min, - unsigned long max, unsigned long size); /** * mas_reset() - Reset a Maple Tree operation state. * @mas: Maple Tree operation state.