* [PATCH] fgraph: Remove some unused functions
@ 2024-06-06 2:10 Jiapeng Chong
2024-06-06 2:17 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2024-06-06 2:10 UTC (permalink / raw)
To: rostedt
Cc: mhiramat, mark.rutland, mathieu.desnoyers, linux-kernel,
linux-trace-kernel, Jiapeng Chong, Abaci Robot
These functions are defined in the fgraph.c file, but not
called elsewhere, so delete these unused functions.
kernel/trace/fgraph.c:273:1: warning: unused function 'set_bitmap_bits'.
kernel/trace/fgraph.c:259:19: warning: unused function 'get_fgraph_type'.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9289
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
kernel/trace/fgraph.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c
index 4bf91eebbb08..c00fbf1d0dd9 100644
--- a/kernel/trace/fgraph.c
+++ b/kernel/trace/fgraph.c
@@ -255,12 +255,6 @@ static inline int get_frame_offset(struct task_struct *t, int offset)
return __get_offset(t->ret_stack[offset]);
}
-/* Get FGRAPH_TYPE from the word from the @offset at ret_stack */
-static inline int get_fgraph_type(struct task_struct *t, int offset)
-{
- return __get_type(t->ret_stack[offset]);
-}
-
/* For BITMAP type: get the bitmask from the @offset at ret_stack */
static inline unsigned long
get_bitmap_bits(struct task_struct *t, int offset)
@@ -268,13 +262,6 @@ get_bitmap_bits(struct task_struct *t, int offset)
return (t->ret_stack[offset] >> FGRAPH_INDEX_SHIFT) & FGRAPH_INDEX_MASK;
}
-/* For BITMAP type: set the bits in the bitmap bitmask at @offset on ret_stack */
-static inline void
-set_bitmap_bits(struct task_struct *t, int offset, unsigned long bitmap)
-{
- t->ret_stack[offset] |= (bitmap << FGRAPH_INDEX_SHIFT);
-}
-
/* Write the bitmap to the ret_stack at @offset (does index, offset and bitmask) */
static inline void
set_bitmap(struct task_struct *t, int offset, unsigned long bitmap)
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] fgraph: Remove some unused functions
2024-06-06 2:10 [PATCH] fgraph: Remove some unused functions Jiapeng Chong
@ 2024-06-06 2:17 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2024-06-06 2:17 UTC (permalink / raw)
To: Jiapeng Chong
Cc: mhiramat, mark.rutland, mathieu.desnoyers, linux-kernel,
linux-trace-kernel, Abaci Robot
On Thu, 6 Jun 2024 10:10:53 +0800
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
> These functions are defined in the fgraph.c file, but not
> called elsewhere, so delete these unused functions.
>
> kernel/trace/fgraph.c:273:1: warning: unused function 'set_bitmap_bits'.
> kernel/trace/fgraph.c:259:19: warning: unused function 'get_fgraph_type'.
>
Thanks, these are leftovers from the rewrite.
-- Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-06 2:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-06 2:10 [PATCH] fgraph: Remove some unused functions Jiapeng Chong
2024-06-06 2:17 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox