Commit ff9fbcaf authored by Benjamin Tissoires's avatar Benjamin Tissoires
Browse files

selftests/hid: fix bpf_wq new API

Since commit f56f4d54 ("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: default avatarBenjamin Tissoires <bentiss@kernel.org>
parent 8031b001
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -455,7 +455,7 @@ struct {
	__type(value, struct elem);
} hmap SEC(".maps");

static int wq_cb_sleepable(void *map, int *key, struct bpf_wq *work)
static int wq_cb_sleepable(void *map, int *key, void *work)
{
	__u8 buf[9] = {2, 3, 4, 5, 6, 7, 8, 9, 10};
	struct hid_bpf_ctx *hid_ctx;
+1 −1
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ extern int hid_bpf_try_input_report(struct hid_bpf_ctx *ctx,
extern int bpf_wq_init(struct bpf_wq *wq, void *p__map, unsigned int flags) __weak __ksym;
extern int bpf_wq_start(struct bpf_wq *wq, unsigned int flags) __weak __ksym;
extern int bpf_wq_set_callback_impl(struct bpf_wq *wq,
		int (callback_fn)(void *map, int *key, struct bpf_wq *wq),
		int (callback_fn)(void *map, int *key, void *wq),
		unsigned int flags__k, void *aux__ign) __ksym;
#define bpf_wq_set_callback(timer, cb, flags) \
	bpf_wq_set_callback_impl(timer, cb, flags, NULL)