aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
diff options
context:
space:
mode:
authorKui-Feng Lee <[email protected]>2024-02-03 22:12:04 -0800
committerMartin KaFai Lau <[email protected]>2024-02-05 10:52:38 -0800
commit169e650069647325496e5a65408ff301874c8e01 (patch)
tree1ccdd32f79d639cd3cdf9b86c50debd1a864df24 /tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
parent7e428638bd784fd9e8944bfbf11513520e141b91 (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 <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Kui-Feng Lee <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c')
-rw-r--r--tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
index 4754c662b39f..a06daebc75c9 100644
--- a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
+++ b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
@@ -554,9 +554,8 @@ static const struct bpf_verifier_ops bpf_testmod_verifier_ops = {
static int bpf_dummy_reg(void *kdata)
{
struct bpf_testmod_ops *ops = kdata;
- int r;
- r = ops->test_2(4, 3);
+ ops->test_2(4, 3);
return 0;
}
@@ -570,9 +569,8 @@ static int bpf_testmod_test_1(void)
return 0;
}
-static int bpf_testmod_test_2(int a, int b)
+static void bpf_testmod_test_2(int a, int b)
{
- return 0;
}
static struct bpf_testmod_ops __bpf_testmod_ops = {