From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: akpm@linux-foundation.org, Liam.Howlett@oracle.com, nathan@kernel.org
Cc: ndesaulniers@google.com, morbo@google.com,
justinstitt@google.com, linux-kernel@vger.kernel.org,
maple-tree@lists.infradead.org, linux-mm@kvack.org,
llvm@lists.linux.dev, jserv@ccns.ncku.edu.tw,
Kuan-Wei Chiu <visitorckw@gmail.com>
Subject: [PATCH] maple_tree: Fix build failure with W=1 and LLVM=1
Date: Fri, 3 May 2024 17:50:27 +0800 [thread overview]
Message-ID: <20240503095027.747838-1-visitorckw@gmail.com> (raw)
When compiling library code using "make W=1 LLVM=1 lib/", clang
generated the following compilation errors:
lib/maple_tree.c:351:21: error: unused function 'mte_set_full' [-Werror,-Wunused-function]
static inline void *mte_set_full(const struct maple_enode *node)
^
lib/maple_tree.c:356:21: error: unused function 'mte_clear_full' [-Werror,-Wunused-function]
static inline void *mte_clear_full(const struct maple_enode *node)
^
lib/maple_tree.c:361:20: error: unused function 'mte_has_null' [-Werror,-Wunused-function]
static inline bool mte_has_null(const struct maple_enode *node)
^
3 errors generated.
Remove unused static inline functions to resolve compilation errors
with clang.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
---
lib/maple_tree.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 55e1b35bf877..cd3f5399f9f3 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -348,21 +348,6 @@ static inline void *mte_safe_root(const struct maple_enode *node)
return (void *)((unsigned long)node & ~MAPLE_ROOT_NODE);
}
-static inline void *mte_set_full(const struct maple_enode *node)
-{
- return (void *)((unsigned long)node & ~MAPLE_ENODE_NULL);
-}
-
-static inline void *mte_clear_full(const struct maple_enode *node)
-{
- return (void *)((unsigned long)node | MAPLE_ENODE_NULL);
-}
-
-static inline bool mte_has_null(const struct maple_enode *node)
-{
- return (unsigned long)node & MAPLE_ENODE_NULL;
-}
-
static __always_inline bool ma_is_root(struct maple_node *node)
{
return ((unsigned long)node->parent & MA_ROOT_PARENT);
--
2.34.1
next reply other threads:[~2024-05-03 9:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-03 9:50 Kuan-Wei Chiu [this message]
2024-05-03 12:20 ` [PATCH] maple_tree: Fix build failure with W=1 and LLVM=1 Matthew Wilcox
2024-05-03 13:01 ` Kuan-Wei Chiu
2024-05-03 13:29 ` Matthew Wilcox
2024-05-03 16:08 ` Nathan Chancellor
2024-05-04 23:02 ` Andrew Morton
2024-05-06 14:29 ` Liam R. Howlett
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=20240503095027.747838-1-visitorckw@gmail.com \
--to=visitorckw@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=jserv@ccns.ncku.edu.tw \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=maple-tree@lists.infradead.org \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.