Skip to content

Commit 8033c6c

Browse files
kuba-mooAlexei Starovoitov
authored andcommitted
bpf: remove unused static inlines
Remove two dead stubs, sk_msg_clear_meta() was never used, use of xskq_cons_is_full() got replaced by xsk_tx_writeable() in v5.10. Signed-off-by: Jakub Kicinski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent ff94368 commit 8033c6c

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

include/linux/bpf.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,11 +1875,6 @@ static inline int bpf_obj_get_user(const char __user *pathname, int flags)
18751875
return -EOPNOTSUPP;
18761876
}
18771877

1878-
static inline bool dev_map_can_have_prog(struct bpf_map *map)
1879-
{
1880-
return false;
1881-
}
1882-
18831878
static inline void __dev_flush(void)
18841879
{
18851880
}
@@ -1943,11 +1938,6 @@ static inline int cpu_map_generic_redirect(struct bpf_cpu_map_entry *rcpu,
19431938
return -EOPNOTSUPP;
19441939
}
19451940

1946-
static inline bool cpu_map_prog_allowed(struct bpf_map *map)
1947-
{
1948-
return false;
1949-
}
1950-
19511941
static inline struct bpf_prog *bpf_prog_get_type_path(const char *name,
19521942
enum bpf_prog_type type)
19531943
{

include/linux/skmsg.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,6 @@ static inline u32 sk_msg_iter_dist(u32 start, u32 end)
171171
#define sk_msg_iter_next(msg, which) \
172172
sk_msg_iter_var_next(msg->sg.which)
173173

174-
static inline void sk_msg_clear_meta(struct sk_msg *msg)
175-
{
176-
memset(&msg->sg, 0, offsetofend(struct sk_msg_sg, copy));
177-
}
178-
179174
static inline void sk_msg_init(struct sk_msg *msg)
180175
{
181176
BUILD_BUG_ON(ARRAY_SIZE(msg->sg.data) - 1 != NR_MSG_FRAG_IDS);

net/xdp/xsk_queue.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,6 @@ static inline void xskq_cons_release_n(struct xsk_queue *q, u32 cnt)
304304
q->cached_cons += cnt;
305305
}
306306

307-
static inline bool xskq_cons_is_full(struct xsk_queue *q)
308-
{
309-
/* No barriers needed since data is not accessed */
310-
return READ_ONCE(q->ring->producer) - READ_ONCE(q->ring->consumer) ==
311-
q->nentries;
312-
}
313-
314307
static inline u32 xskq_cons_present_entries(struct xsk_queue *q)
315308
{
316309
/* No barriers needed since data is not accessed */

0 commit comments

Comments
 (0)