diff options
| author | Kui-Feng Lee <thinker.li@gmail.com> | 2024-02-03 22:12:04 -0800 |
|---|---|---|
| committer | Martin KaFai Lau <martin.lau@kernel.org> | 2024-02-05 10:52:38 -0800 |
| commit | 169e650069647325496e5a65408ff301874c8e01 (patch) | |
| tree | 1ccdd32f79d639cd3cdf9b86c50debd1a864df24 /tools/testing/selftests/bpf/progs/struct_ops_module.c | |
| parent | 7e428638bd784fd9e8944bfbf11513520e141b91 (diff) | |
selftests/bpf: Suppress warning message of an unused variable.
"r" is used to receive the return value of test_2 in bpf_testmod.c, but it
is not actually used. So, we remove "r" and change the return type to
"void".
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401300557.z5vzn8FM-lkp@intel.com/
Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20240204061204.1864529-1-thinker.li@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/struct_ops_module.c')
| -rw-r--r-- | tools/testing/selftests/bpf/progs/struct_ops_module.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/progs/struct_ops_module.c b/tools/testing/selftests/bpf/progs/struct_ops_module.c index e44ac55195ca..b78746b3cef3 100644 --- a/tools/testing/selftests/bpf/progs/struct_ops_module.c +++ b/tools/testing/selftests/bpf/progs/struct_ops_module.c @@ -16,10 +16,9 @@ int BPF_PROG(test_1) } SEC("struct_ops/test_2") -int BPF_PROG(test_2, int a, int b) +void BPF_PROG(test_2, int a, int b) { test_2_result = a + b; - return a + b; } SEC(".struct_ops.link") |