From patchwork Mon May 22 05:06:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Zhang X-Patchwork-Id: 13249776 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 762D5C7EE29 for ; Mon, 22 May 2023 05:07:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 12179900011; Mon, 22 May 2023 01:07:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0AA96900002; Mon, 22 May 2023 01:07:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EB420900011; Mon, 22 May 2023 01:07:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id DB176900002 for ; Mon, 22 May 2023 01:07:50 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id B16284044B for ; Mon, 22 May 2023 05:07:50 +0000 (UTC) X-FDA: 80816708700.26.BCFC143 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by imf28.hostedemail.com (Postfix) with ESMTP id DE21CC0007 for ; Mon, 22 May 2023 05:07:48 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=AzHzNd0m; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf28.hostedemail.com: domain of zhangpeng.00@bytedance.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=zhangpeng.00@bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684732068; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4yOLk/7tHD7/ODqSb7roZU5d9FbnbbLKf36QePLl4Fs=; b=3XVMv6m9cJog2tSXMKnAU6IqnEWI5DbtRJ8juVI9PeY/Q9OKIaRdnmEhCVo/3OQDPg761I /9rqJlhT8aqSFnu+1OpbKv6iJX2JNW7XHo+IgCzB4OQ8b3PAweLX16NaFToZ02qOW0G8Kr 2gRK5AV2Rv2nLGQ1swjDCgBbqxXgkcA= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=AzHzNd0m; dmarc=pass (policy=quarantine) header.from=bytedance.com; spf=pass (imf28.hostedemail.com: domain of zhangpeng.00@bytedance.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=zhangpeng.00@bytedance.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684732068; a=rsa-sha256; cv=none; b=ojTs7fwUS9wIwTgBE/ztyHQPF2tURknI2i+EN03/tUhW6zl48NBLAozH701Hnn8Fb9D2Mc zA49RuYLfBAMBTMRxcqIfCbzMRYnakF1NX9u6+73opOn0q0FDQuGwwUAlZvE2RkJJlnP69 npKhkoW/80p0bQ7cmt5hnYSNCcIQIAw= Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-64d30ab1ef2so2133663b3a.2 for ; Sun, 21 May 2023 22:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1684732068; x=1687324068; 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=4yOLk/7tHD7/ODqSb7roZU5d9FbnbbLKf36QePLl4Fs=; b=AzHzNd0mvm+jLZUdv/e7B4MQC3FEjUAXCF3VVAaoRyZSNx71MXEV51MxVvMQPGTRnL beZ/HAieLZVm6erPnazYr8lxJ/KMnHLGwVLS9rpwqD4TZwtSOLNIx2ilFdPluS8Fo5wH aulAdvKjGbORvC5pYRoimAsxCsbmmub7MiwaCjUVNgDxrPoNguk1B2QxFs2f/4u0BDxC ghdjhr9rKY4kS7OZrxzDsus7afl7TirEZO6XG2XE9PaDtCnJIS3J6uHgXmphvXYrsd64 V0VVSCQSKamOqt+7V9vZLiSj9VDqYA4y4mi6VfOkA+OqJDHu8LZDsc5yOBZRw9CnQDtp /E8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684732068; x=1687324068; 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=4yOLk/7tHD7/ODqSb7roZU5d9FbnbbLKf36QePLl4Fs=; b=IJcC2HyP8ob/93uYysH47VyosApu/nZiPKlOiPxlnNTPGiOgyw5Vrh1OjVbAoEia9M 41dHPNMR5EmFXe6W+mDSb7IJmwmdS78tNYS9TitC5VuIgF24VBsAxYUaCOWOZfHH4TFG PMO5t01hY3eNAQbe71tCO8PXT7Tb9xpAew5OzbUTSEcdjh59tzEnIacC2C9X3CnHsetJ f4DVm3zE+oXv21y0BFmz/EY46kDESnq1NvPafFLccK4UFy0QKHtM+4uN3yI03UuIMxvB pfEjm7LCqVWVNBA6DmASv2PrwrfLhPabVFzp68m6FOZWiKJFNtyRLyq9bSuxJdqFXWQM LfhQ== X-Gm-Message-State: AC+VfDwQ+hwSageXnR/UK1B2dqRLeoSe045LzgkUjL0ae7yomJFVd1FW nc9DRQcl77dL8uSkps9BvC7+NQ== X-Google-Smtp-Source: ACHHUZ4VTPblQwvMklYDFzU1McTkdLu8cOzHgLuHXQ1smW7pdssNegVfLfyh8uucTfzZ0+l2hFIQ4w== X-Received: by 2002:a05:6a00:c8d:b0:644:c365:50d5 with SMTP id a13-20020a056a000c8d00b00644c36550d5mr11924837pfv.6.1684732067735; Sun, 21 May 2023 22:07:47 -0700 (PDT) Received: from GL4FX4PXWL.bytedance.net ([139.177.225.249]) by smtp.gmail.com with ESMTPSA id t10-20020a62ea0a000000b0063b5776b073sm3247519pfh.117.2023.05.21.22.07.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 21 May 2023 22:07:47 -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 v3 10/10] maple_tree: Relocate the declaration of mas_empty_area_rev(). Date: Mon, 22 May 2023 13:06:56 +0800 Message-Id: <20230522050656.96215-11-zhangpeng.00@bytedance.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20230522050656.96215-1-zhangpeng.00@bytedance.com> References: <20230522050656.96215-1-zhangpeng.00@bytedance.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: DE21CC0007 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: t11ij4qhcjrdrdp9ebbikdf1k8eiznmq X-HE-Tag: 1684732068-10428 X-HE-Meta: U2FsdGVkX19+afH3ISNfpwAXA1eoDP4eU1xsHhtf9Gj4snAaZQdYXMBwsVSLIDJl63IQ7utH9bfFs/h1XqxzWh7XgxbDnNlg3o/z/dk+T7OgszUnG8sWF0qyzooA0YYVzC0CMMsfZw5uw5CQGeQEXZY5+rmg6awoDGywRpFKrSVxthi6ZRyOWW5n8YP7IpWAMKnq6ctgyUVguUx0I8U1eF4nOWcNYHL/OmQ77MW1NDQu6ejF7g9Aglk2LnYSDW7ZPCKZBEk9EpWjqUu+ppRvPKJaVW3QidgRZVgGD019lgPp3yIPvbme2dLm31N6I80sqPTzMRsMH+0DGVinS6krQGmL5lcVwLsqkVxQ9p8tt/NmnemSEjK9Dq/nMOYyr4y4SiqtZDeJ5xHsHPbKGKsubmy4gz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=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 85559a34a098..c4681cb8414f 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.