perf util: Remove unused pstack__pop
authorDr. David Alan Gilbert <linux@treblig.org>
Wed, 5 Mar 2025 02:31:17 +0000 (02:31 +0000)
committerNamhyung Kim <namhyung@kernel.org>
Mon, 10 Mar 2025 18:31:24 +0000 (11:31 -0700)
The last use of pstack__pop() was removed in 2015 by
commit 6422184b087f ("perf hists browser: Simplify zooming code using
pstack_peek()")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250305023120.155420-4-linux@treblig.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/pstack.c
tools/perf/util/pstack.h

index a1d1e4ef6257ee9a4d6d1f8e5e317f00b6412955..141ffa129c69067950eedd4743a27e92a5c7486f 100644 (file)
@@ -63,20 +63,6 @@ void pstack__push(struct pstack *pstack, void *key)
        pstack->entries[pstack->top++] = key;
 }
 
-void *pstack__pop(struct pstack *pstack)
-{
-       void *ret;
-
-       if (pstack->top == 0) {
-               pr_err("%s: underflow!\n", __func__);
-               return NULL;
-       }
-
-       ret = pstack->entries[--pstack->top];
-       pstack->entries[pstack->top] = NULL;
-       return ret;
-}
-
 void *pstack__peek(struct pstack *pstack)
 {
        if (pstack->top == 0)
index 8729b8be061d6ecf796a5349ad602d569b6db6ad..712051b8130f06e62c7b62095aaa84a1fa08ab1d 100644 (file)
@@ -10,7 +10,6 @@ void pstack__delete(struct pstack *pstack);
 bool pstack__empty(const struct pstack *pstack);
 void pstack__remove(struct pstack *pstack, void *key);
 void pstack__push(struct pstack *pstack, void *key);
-void *pstack__pop(struct pstack *pstack);
 void *pstack__peek(struct pstack *pstack);
 
 #endif /* _PERF_PSTACK_ */