[PATCH] tools/bpf: Remove unnecessary parameter in bpf_object__probe_loading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



struct bpf_object *obj is not used in bpf_object__probe_loading, so we
can remove it.

Signed-off-by: Peng Hao <richard.peng@xxxxxxxx>
---
 tools/lib/bpf/libbpf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 313034117070..17d90779f09a 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -3685,7 +3685,7 @@ int bpf_map__resize(struct bpf_map *map, __u32 max_entries)
 }

 static int
-bpf_object__probe_loading(struct bpf_object *obj)
+bpf_object__probe_loading(void)
 {
        struct bpf_load_program_attr attr;
        char *cp, errmsg[STRERR_BUFSIZE];
@@ -7258,7 +7258,7 @@ int bpf_object__load_xattr(struct bpf_object_load_attr *attr)
                return -EINVAL;
        }

-       err = bpf_object__probe_loading(obj);
+       err = bpf_object__probe_loading();
        err = err ? : bpf_object__load_vmlinux_btf(obj);
        err = err ? : bpf_object__resolve_externs(obj, obj->kconfig);
        err = err ? : bpf_object__sanitize_and_load_btf(obj);
--
2.18.4




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux