Skip to content

Commit ff9fbca

Browse files
author
Benjamin Tissoires
committed
selftests/hid: fix bpf_wq new API
Since commit f56f4d5 ("bpf: helpers: fix bpf_wq_set_callback_impl signature"), the API for bpf_wq changed a bit. We need to update the selftests/hid code to reflect that or the bpf program will not load. Link: https://patch.msgid.link/20240723-fix-6-11-bpf-v1-1-b9d770346784@kernel.org Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
1 parent 8031b00 commit ff9fbca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/testing/selftests/hid/progs/hid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ struct {
455455
__type(value, struct elem);
456456
} hmap SEC(".maps");
457457

458-
static int wq_cb_sleepable(void *map, int *key, struct bpf_wq *work)
458+
static int wq_cb_sleepable(void *map, int *key, void *work)
459459
{
460460
__u8 buf[9] = {2, 3, 4, 5, 6, 7, 8, 9, 10};
461461
struct hid_bpf_ctx *hid_ctx;

tools/testing/selftests/hid/progs/hid_bpf_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ extern int hid_bpf_try_input_report(struct hid_bpf_ctx *ctx,
114114
extern int bpf_wq_init(struct bpf_wq *wq, void *p__map, unsigned int flags) __weak __ksym;
115115
extern int bpf_wq_start(struct bpf_wq *wq, unsigned int flags) __weak __ksym;
116116
extern int bpf_wq_set_callback_impl(struct bpf_wq *wq,
117-
int (callback_fn)(void *map, int *key, struct bpf_wq *wq),
117+
int (callback_fn)(void *map, int *key, void *wq),
118118
unsigned int flags__k, void *aux__ign) __ksym;
119119
#define bpf_wq_set_callback(timer, cb, flags) \
120120
bpf_wq_set_callback_impl(timer, cb, flags, NULL)

0 commit comments

Comments
 (0)