Skip to content

Commit 56c26d5

Browse files
Yang Lianakryiko
Yang Li
authored andcommitted
bpf: Remove unused backtrack_state helper functions
The function are defined in the verifier.c file, but not called elsewhere, so delete the unused function. kernel/bpf/verifier.c:3448:20: warning: unused function 'bt_set_slot' kernel/bpf/verifier.c:3453:20: warning: unused function 'bt_clear_slot' kernel/bpf/verifier.c:3488:20: warning: unused function 'bt_is_slot_set' Reported-by: Abaci Robot <[email protected]> Signed-off-by: Yang Li <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/bpf/[email protected] Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7714
1 parent f77d795 commit 56c26d5

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

kernel/bpf/verifier.c

-15
Original file line numberDiff line numberDiff line change
@@ -3465,16 +3465,6 @@ static inline void bt_clear_frame_slot(struct backtrack_state *bt, u32 frame, u3
34653465
bt->stack_masks[frame] &= ~(1ull << slot);
34663466
}
34673467

3468-
static inline void bt_set_slot(struct backtrack_state *bt, u32 slot)
3469-
{
3470-
bt_set_frame_slot(bt, bt->frame, slot);
3471-
}
3472-
3473-
static inline void bt_clear_slot(struct backtrack_state *bt, u32 slot)
3474-
{
3475-
bt_clear_frame_slot(bt, bt->frame, slot);
3476-
}
3477-
34783468
static inline u32 bt_frame_reg_mask(struct backtrack_state *bt, u32 frame)
34793469
{
34803470
return bt->reg_masks[frame];
@@ -3505,11 +3495,6 @@ static inline bool bt_is_frame_slot_set(struct backtrack_state *bt, u32 frame, u
35053495
return bt->stack_masks[frame] & (1ull << slot);
35063496
}
35073497

3508-
static inline bool bt_is_slot_set(struct backtrack_state *bt, u32 slot)
3509-
{
3510-
return bt_is_frame_slot_set(bt, bt->frame, slot);
3511-
}
3512-
35133498
/* format registers bitmask, e.g., "r0,r2,r4" for 0x15 mask */
35143499
static void fmt_reg_mask(char *buf, ssize_t buf_sz, u32 reg_mask)
35153500
{

0 commit comments

Comments
 (0)