Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf util: Remove unused pstack__pop

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>

authored by

Dr. David Alan Gilbert and committed by
Namhyung Kim
cf99ec15 a9b496f4

-15
-14
tools/perf/util/pstack.c
··· 63 63 pstack->entries[pstack->top++] = key; 64 64 } 65 65 66 - void *pstack__pop(struct pstack *pstack) 67 - { 68 - void *ret; 69 - 70 - if (pstack->top == 0) { 71 - pr_err("%s: underflow!\n", __func__); 72 - return NULL; 73 - } 74 - 75 - ret = pstack->entries[--pstack->top]; 76 - pstack->entries[pstack->top] = NULL; 77 - return ret; 78 - } 79 - 80 66 void *pstack__peek(struct pstack *pstack) 81 67 { 82 68 if (pstack->top == 0)
-1
tools/perf/util/pstack.h
··· 10 10 bool pstack__empty(const struct pstack *pstack); 11 11 void pstack__remove(struct pstack *pstack, void *key); 12 12 void pstack__push(struct pstack *pstack, void *key); 13 - void *pstack__pop(struct pstack *pstack); 14 13 void *pstack__peek(struct pstack *pstack); 15 14 16 15 #endif /* _PERF_PSTACK_ */