These are concrete patches responding to my comments for
Magnus's patch. Specifically, Patch #1 used global functions
to facilitate pr_* macros in the header files so they
are available in different C files.
Patch #2 simplified libbpf_set_print() takes only one print
function and the print function has a "level" argument.

Yonghong Song (2):
  tools/bpf: move libbpf pr_* debug print functions to headers
  tools/bpf: simplify libbpf API function libbpf_set_print()

 tools/lib/bpf/btf.c                           | 97 +++++++++----------
 tools/lib/bpf/btf.h                           |  7 +-
 tools/lib/bpf/libbpf.c                        | 45 +++++----
 tools/lib/bpf/libbpf.h                        | 20 ++--
 tools/lib/bpf/test_libbpf.cpp                 |  4 +-
 tools/lib/bpf/util.h                          | 32 ++++++
 tools/perf/util/bpf-loader.c                  | 32 +++---
 tools/testing/selftests/bpf/test_btf.c        |  7 +-
 .../testing/selftests/bpf/test_libbpf_open.c  | 36 ++++---
 tools/testing/selftests/bpf/test_progs.c      | 20 +++-
 10 files changed, 166 insertions(+), 134 deletions(-)
 create mode 100644 tools/lib/bpf/util.h

-- 
2.17.1

Reply via email to