selftest/bpf: Fix compilation warnings in 32-bit mode
Fix compilation warnings emitted when compiling selftests for 32-bit platform (x86 in my case). Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200813204945.1020225-3-andriin@fb.com
This commit is contained in:

committed by
Alexei Starovoitov

parent
09f44b753a
commit
9028bbcc3e
@@ -135,6 +135,11 @@ static inline __u64 ptr_to_u64(const void *ptr)
|
||||
return (__u64) (unsigned long) ptr;
|
||||
}
|
||||
|
||||
static inline void *u64_to_ptr(__u64 ptr)
|
||||
{
|
||||
return (void *) (unsigned long) ptr;
|
||||
}
|
||||
|
||||
int bpf_find_map(const char *test, struct bpf_object *obj, const char *name);
|
||||
int compare_map_keys(int map1_fd, int map2_fd);
|
||||
int compare_stack_ips(int smap_fd, int amap_fd, int stack_trace_len);
|
||||
|
Reference in New Issue
Block a user