From: David Hildenbrand <david@redhat.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, Liam.Howlett@oracle.com
Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH] maple_tree: Remove unused function
Date: Fri, 27 Oct 2023 11:32:45 +0200 [thread overview]
Message-ID: <78a98a32-6238-4881-bfbc-0e7888aea7b1@redhat.com> (raw)
In-Reply-To: <20231027084944.24888-1-jiapeng.chong@linux.alibaba.com>
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>
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2023-10-27 9:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 8:49 Jiapeng Chong
2023-10-27 9:32 ` David Hildenbrand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=78a98a32-6238-4881-bfbc-0e7888aea7b1@redhat.com \
--to=david@redhat.com \
--cc=Liam.Howlett@oracle.com \
--cc=abaci@linux.alibaba.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maple-tree@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox