From patchwork Fri Oct 27 08:49:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiapeng Chong X-Patchwork-Id: 13438382 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 42A16C25B6E for ; Fri, 27 Oct 2023 08:50:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4E5818D0034; Fri, 27 Oct 2023 04:50:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 495928D000F; Fri, 27 Oct 2023 04:50:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3847E8D0034; Fri, 27 Oct 2023 04:50:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 299C38D000F for ; Fri, 27 Oct 2023 04:50:11 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id F2C3CC119B for ; Fri, 27 Oct 2023 08:50:10 +0000 (UTC) X-FDA: 81390619380.24.D612E97 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by imf18.hostedemail.com (Postfix) with ESMTP id 8295D1C0002 for ; Fri, 27 Oct 2023 08:50:06 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf18.hostedemail.com: domain of jiapeng.chong@linux.alibaba.com designates 115.124.30.131 as permitted sender) smtp.mailfrom=jiapeng.chong@linux.alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698396608; 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:references; bh=BitLEcF23CKSuXnG8afnIhBHF+u8FiLEHAEbYdEcF14=; b=XTWfFPKxYIy4Y/jmYqFYHjWtoQioEO0LYkm3zghaSHwv3JNVLjatjd0h/9Wx0QF8554EKJ 1u6yNcER4RZHr2meueV26HdMP41l6D2fMy6cfvV4EVFvl3BvrLm/3GxWzXDl5UGqoG45SO f42RV3WAKQ+zQerx638LG5a47p3RMqc= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf18.hostedemail.com: domain of jiapeng.chong@linux.alibaba.com designates 115.124.30.131 as permitted sender) smtp.mailfrom=jiapeng.chong@linux.alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698396608; a=rsa-sha256; cv=none; b=YnDlHQmK6rWeYw5N9An/eL6TkPTapqMptJfv6g/wOi40P5GH55YALlD3YPs58UxJVpicI1 7u2T0bOd1pN8+09wQitilEKU7opm6Z7PF5QZWVL4oEcrLyQ/YGhr1wMa8lzj0q4VvMZMyU ZmHeL5ETybjqITyPKdXPTvEZGgIR3nU= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R811e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0Vv-KCG0_1698396586; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0Vv-KCG0_1698396586) by smtp.aliyun-inc.com; Fri, 27 Oct 2023 16:49:55 +0800 From: Jiapeng Chong To: Liam.Howlett@oracle.com Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] maple_tree: Remove unused function Date: Fri, 27 Oct 2023 16:49:44 +0800 Message-Id: <20231027084944.24888-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 X-Rspamd-Queue-Id: 8295D1C0002 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: wbshbxqh7nojfxo3zts1xeac7w5uhpuw X-HE-Tag: 1698396606-174973 X-HE-Meta: U2FsdGVkX19EG0VZ+Fo4hXu5cOgcFmbk2Fpbxf2kcFymjwf0VJHHz4cKXSGy7Ccn+mslVJCrwxKJ4AwC9tbPPApQQmole/Fn2F2RE8RB5kfxZ71z0URY4GejbSXmFBvjuKksl88c4xDNhwxHkPBaNMkfGDnPODHfpjGiAFQ97arbIY5IeJbz763gXzBj3F6SYvvHRHAFt7U7RZuT/Tf8tyZMAqvP7Z1IhmADdEzRY6nBRnrkAt56ZeWL/6AzXSbDFIrZrTL6KcWL8mUOhoXb3uoR+yNeRakMg289k/bML0QMGcA4y1d6VB03my0QvruPWehVwfdTt0tRRPH6+oiqXvcsmFcsTElhTWiIVEfwri6le5WePM9/bm32pNgwa3wI9VuH32zsCmS4/PzJsCZDRydCYGhmROPSxRtvYl/PQ4ehUVEA4GdoGcDPHsj/SUtfj7OpMaW58/3KJIsiCM03aHGEGltQzpRCKPseMJRgyBdK+Iudpc690aZn5qqLdC0UdGjq60SjzpVv8TxEcSMHMmoYig44zaWc/ITmarDAG7QUXAKcgX1dMS6aCvQwQcmP0jz1itlfBdINPrfyj+cg0dGqPum4ttgiX5imTHX6xk9k6LVNU9P6Lph3XrAdZkhuKbTXHu/eQv1j55M8K9JkgcxDRDUYxpL1GwbugvwcK5ClpTpNHwcNZY7qFB7KBCNp/9ts6qU73rM4viuRK74EFZX3XATfIjlcxjLTb6n46HWgOpf4HCp7JBeeBtv+7s633chM/qmqm0yK2uy12tgjTsGhPb1dT6o2OG6S4JDd9WtjLgeeI4zmIVxCg29Ew3Yd0Lrg9y9suPAB+bECLrXoQd4csF+/oO1etB/COM+yEFUnaCzZGw5NzqzUx7J63Z7UJlcI3GlWsc8Z27sknZCoFUQf1BYylfqiDsy+U9EhHOFEKi7LWUUJgzIGGNn91LK6OQ5kSSW2MfZKLw5N23l FEoPsnTO Q1BgGVHidGyI+qAmU3COf08Vzxe5Tb9SaU4WALdp+5XlowsD8nE65C+K+X405r4PXyo746HJCE1okioeWosm8+ENZhrKXrO0mpWWWp0heQAjr43csffYHKz0EWRj2eJhYxIcWMQUbuuSIzI5OObvz87wO+3sq3VZHEmQTgwFMr6+xqKI1wZVa1X9n3w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.002719, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The function are defined in the maple_tree.c file, but not called elsewhere, so delete the unused function. lib/maple_tree.c:689:29: warning: unused function 'mas_pivot'. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7064 Signed-off-by: Jiapeng Chong Acked-by: David Hildenbrand --- lib/maple_tree.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index bb24d84a4922..cf889aaa0011 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -679,35 +679,6 @@ static inline unsigned long *ma_gaps(struct maple_node *node, return NULL; } -/* - * mas_pivot() - Get the pivot at @piv of the maple encoded node. - * @mas: The maple state. - * @piv: The pivot. - * - * Return: the pivot at @piv of @mn. - */ -static inline unsigned long mas_pivot(struct ma_state *mas, unsigned char piv) -{ - struct maple_node *node = mas_mn(mas); - enum maple_type type = mte_node_type(mas->node); - - if (MAS_WARN_ON(mas, piv >= mt_pivots[type])) { - mas_set_err(mas, -EIO); - return 0; - } - - switch (type) { - case maple_arange_64: - return node->ma64.pivot[piv]; - case maple_range_64: - case maple_leaf_64: - return node->mr64.pivot[piv]; - case maple_dense: - return 0; - } - return 0; -} - /* * mas_safe_pivot() - get the pivot at @piv or mas->max. * @mas: The maple state