tools lib bpf: Use IS_ERR() reporting macros with bpf_map__get_def()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 2 Jun 2016 17:21:06 +0000 (14:21 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 6 Jun 2016 21:18:55 +0000 (18:18 -0300)
commit53897a78ca6d4bd64e8c17d76cfec65d237f9447
tree10cd769f2e67012fde24dda86ec720416d599d34
parent009ad5d5945697a887f0c1b2d581503d92dcde6f
tools lib bpf: Use IS_ERR() reporting macros with bpf_map__get_def()

And for consistency, rename it to bpf_map__def(), leaving "get" for
reference counting.

Also make it return a const pointer, as suggested by Wang.

Acked-by: Wang Nan <wangnan0@huawei.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/tip-mer00xqkiho0ymg66b5i9luw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h
tools/perf/util/bpf-loader.c