[PATCH bpf-next v3 5/6] selftests/bpf: Unify memory address casting operation style

From: Pu Lehui
Date: Mon May 30 2022 - 04:58:57 EST


The members of bpf_prog_info, which are line_info and jited_line_info
store u64 address pointed to the corresponding memory regions. Memory
addresses are conceptually unsigned, (unsigned long) casting makes
more sense, so let's make a change for conceptual uniformity.

Signed-off-by: Pu Lehui <pulehui@xxxxxxxxxx>
---
tools/testing/selftests/bpf/prog_tests/btf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/btf.c b/tools/testing/selftests/bpf/prog_tests/btf.c
index ba5bde53d418..e6612f2bd0cf 100644
--- a/tools/testing/selftests/bpf/prog_tests/btf.c
+++ b/tools/testing/selftests/bpf/prog_tests/btf.c
@@ -6550,8 +6550,8 @@ static int test_get_linfo(const struct prog_info_raw_test *test,
info.nr_jited_line_info, jited_cnt,
info.line_info_rec_size, rec_size,
info.jited_line_info_rec_size, jited_rec_size,
- (void *)(long)info.line_info,
- (void *)(long)info.jited_line_info)) {
+ (void *)(unsigned long)info.line_info,
+ (void *)(unsigned long)info.jited_line_info)) {
err = -1;
goto done;
}
--
2.25.1