summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel T. Lee <danieltimlee@gmail.com>2022-12-18 07:14:51 +0100
committerMartin KaFai Lau <martin.lau@kernel.org>2022-12-19 23:21:05 +0100
commit13aa2a92840dd49a64362ddd1e4d16084a4b9e0f (patch)
treeaa63b6892020410bcaa98de45721b5e08432f583
parentbpf: Remove trace_printk_lock (diff)
downloadlinux-13aa2a92840dd49a64362ddd1e4d16084a4b9e0f.tar.xz
linux-13aa2a92840dd49a64362ddd1e4d16084a4b9e0f.zip
samples/bpf: remove unused function with test_lru_dist
Currently, compiling samples/bpf with LLVM warns about the unused function with test_lru_dist. ./samples/bpf/test_lru_dist.c:45:19: warning: unused function 'list_empty' [-Wunused-function] static inline int list_empty(const struct list_head *head) ^ 1 warning generated. This commit resolve this compiler warning by removing the abandoned function. Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/r/20221218061453.6287-2-danieltimlee@gmail.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
-rw-r--r--samples/bpf/test_lru_dist.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/samples/bpf/test_lru_dist.c b/samples/bpf/test_lru_dist.c
index 5efb91763d65..1c161276d57b 100644
--- a/samples/bpf/test_lru_dist.c
+++ b/samples/bpf/test_lru_dist.c
@@ -42,11 +42,6 @@ static inline void INIT_LIST_HEAD(struct list_head *list)
list->prev = list;
}
-static inline int list_empty(const struct list_head *head)
-{
- return head->next == head;
-}
-
static inline void __list_add(struct list_head *new,
struct list_head *prev,
struct list_head *next)