Message ID | 20231027084944.24888-1-jiapeng.chong@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp455701vqb; Fri, 27 Oct 2023 01:52:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHe11eXcroSwzSObseQnQyzbbBMCWKydvaq6PYd7FU/nlhQB5qTOKKbehm4y/x5yqHeyHx1 X-Received: by 2002:a05:620a:190d:b0:778:8822:9a3f with SMTP id bj13-20020a05620a190d00b0077888229a3fmr2049663qkb.63.1698396757919; Fri, 27 Oct 2023 01:52:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698396757; cv=none; d=google.com; s=arc-20160816; b=G/iv4RFVJhGHUr6v21koFykpVmdhPosMIGZgf4FFGmjE8YgsIc1qW/6Oxf/edliwv4 dmbAgRLaejUGMHXZTcC8q+MYvLjANx/g2WFW5ADEGXdvdeDQxI+jWrAj0Hgyw0bVcC/S rUnohHSHbB/Hxo5p+avGk9ady/9MoprLZqveq1hXblTIkV1uGwXUvnaCXfBGtQFi/Nmo UfMfWo0+MGcqdcTkEf0wNtU3E+l+X6/f6wHj65SNYucmcAOzJkAWEQh3Y/uIwo9UyICD melnGQBLOS3lu+hX1iwcKqIzo7BlR0wReMcAx4Prgh+yZHy8j5ZbG+eRbjH7vBuuyVyN ea5A== 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 :message-id:date:subject:cc:to:from; bh=BitLEcF23CKSuXnG8afnIhBHF+u8FiLEHAEbYdEcF14=; fh=88qPWDBFeiFdWL+kCjCq5pMh/xXXlNsNuTH7BmU2R4A=; b=lKTIAuGOAdYySyz72LllVg2Scp6UxSAkQ2fex30M6kX+7vGZs/I15jyXiJsalspvQ0 3Ub+eCdHOoyeMkp88d0Nx9XfEDEWjP2+6GNZ8367jQ4xHRboBPExeqD9+O8l24FM3ekO SwP4GSICelLC4LM0IpMJ8tSvcXwRvPatEF86WQIZwAuvXncnmY0O/2iT0MkHmxiy76nr tdLLvTRh3Hscv61FPOeBM7ypc3wWe93DpexU1PKvFY18NKjvEt2DfVgAgrmd2tRX6nyd WqmW8ZwrOtfksdRncpKDzCPma5cahtTxr74ns9Ck9AEJg+j9HqxZoPQy68c9ud5JC9si WcXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id g138-20020a25db90000000b00da07dadfea6si2167112ybf.490.2023.10.27.01.52.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 01:52:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4708C8070D45; Fri, 27 Oct 2023 01:50:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345534AbjJ0IuF (ORCPT <rfc822;aposhian.dev@gmail.com> + 26 others); Fri, 27 Oct 2023 04:50:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234963AbjJ0IuE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 27 Oct 2023 04:50:04 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17B05BD for <linux-kernel@vger.kernel.org>; Fri, 27 Oct 2023 01:50:00 -0700 (PDT) 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 <jiapeng.chong@linux.alibaba.com> To: Liam.Howlett@oracle.com Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, Abaci Robot <abaci@linux.alibaba.com> 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 27 Oct 2023 01:50:25 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780898078844092532 X-GMAIL-MSGID: 1780898078844092532 |
Series |
maple_tree: Remove unused function
|
|
Commit Message
Jiapeng Chong
Oct. 27, 2023, 8:49 a.m. UTC
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 <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7064
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
lib/maple_tree.c | 29 -----------------------------
1 file changed, 29 deletions(-)
Comments
On 27.10.23 10:49, Jiapeng Chong wrote: > 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 <abaci@linux.alibaba.com> > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7064 > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> > --- > 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 Think the last user was removed with c2aa6f5328b9 ("maple_tree: drop mas_{rev_}alloc() and mas_fill_gap()"). Acked-by: David Hildenbrand <david@redhat.com>
* Jiapeng Chong <jiapeng.chong@linux.alibaba.com> [231027 04:50]: > 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 <abaci@linux.alibaba.com> > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7064 > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Thanks, this has fallen out of use and isn't used in the testing code either. Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> > --- > 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 > -- > 2.20.1.7.g153144c >
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