diff options
| author | Christy Lee <[email protected]> | 2022-01-08 00:42:17 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2022-01-13 01:01:38 +0000 |
| commit | 8d6fabf1654a8c26e4e081d0b934285d6d8868cb (patch) | |
| tree | a9ba6d75c623a1e0d31dc0b395405dc2164c8e16 /tools/testing/selftests/bpf/prog_tests/global_data_init.c | |
| parent | perf: Stop using bpf_map__def() API (diff) | |
| download | kernel-8d6fabf1654a8c26e4e081d0b934285d6d8868cb.tar.gz kernel-8d6fabf1654a8c26e4e081d0b934285d6d8868cb.zip | |
selftests/bpf: Stop using bpf_map__def() API
libbpf bpf_map__def() API is being deprecated, replace selftests/bpf's
usage with the appropriate getters and setters.
Signed-off-by: Christy Lee <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/global_data_init.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/global_data_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/global_data_init.c b/tools/testing/selftests/bpf/prog_tests/global_data_init.c index 1db86eab101b..57331c606964 100644 --- a/tools/testing/selftests/bpf/prog_tests/global_data_init.c +++ b/tools/testing/selftests/bpf/prog_tests/global_data_init.c @@ -20,7 +20,7 @@ void test_global_data_init(void) if (CHECK_FAIL(!map || !bpf_map__is_internal(map))) goto out; - sz = bpf_map__def(map)->value_size; + sz = bpf_map__value_size(map); newval = malloc(sz); if (CHECK_FAIL(!newval)) goto out; |
