diff options
| author | Vishal Chourasia <vishalc@linux.ibm.com> | 2024-10-24 10:46:09 +0530 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2024-10-24 06:56:17 -1000 |
| commit | 4f7f417042b242c1e5a9ed03741acb5d900e0871 (patch) | |
| tree | 3328ec0000163779f05b60d2c097efc6517dce68 /tools/testing/selftests/sched_ext/prog_run.bpf.c | |
| parent | 9b3c11a867a82ebee4e096008014417918b82801 (diff) | |
sched_ext: Fix function pointer type mismatches in BPF selftests
Fix incompatible function pointer type warnings in sched_ext BPF selftests by
explicitly casting the function pointers when initializing struct_ops.
This addresses multiple -Wincompatible-function-pointer-types warnings from the
clang compiler where function signatures didn't match exactly.
The void * cast ensures the compiler accepts the function pointer
assignment despite minor type differences in the parameters.
Signed-off-by: Vishal Chourasia <vishalc@linux.ibm.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/testing/selftests/sched_ext/prog_run.bpf.c')
| -rw-r--r-- | tools/testing/selftests/sched_ext/prog_run.bpf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/sched_ext/prog_run.bpf.c b/tools/testing/selftests/sched_ext/prog_run.bpf.c index 6a4d7c48e3f2..00c267626a68 100644 --- a/tools/testing/selftests/sched_ext/prog_run.bpf.c +++ b/tools/testing/selftests/sched_ext/prog_run.bpf.c @@ -28,6 +28,6 @@ void BPF_STRUCT_OPS(prog_run_exit, struct scx_exit_info *ei) SEC(".struct_ops.link") struct sched_ext_ops prog_run_ops = { - .exit = prog_run_exit, + .exit = (void *) prog_run_exit, .name = "prog_run", }; |
