linux-stable/tools
Yu Kuai d3fddc355a perf stat: Fix error return code in bperf__load()
Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.

Committer notes:

Added the missing {} for the now multiline 'if' block, fixing this error:

    CC      /tmp/build/perf/util/bpf_counter.o
  util/bpf_counter.c: In function ‘bperf__load’:
  util/bpf_counter.c:523:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
    523 |         if (evsel->bperf_leader_link_fd < 0 &&
        |         ^~
  util/bpf_counter.c:526:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
    526 |                 goto out;
        |                 ^~~~
  cc1: all warnings being treated as errors

Fixes: 7fac83aaf2 ("perf stat: Introduce 'bperf' to share hardware PMCs with BPF")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Yu Kuai <yukuai3@huawei.com>
Cc: Zhang Yi <yi.zhang@huawei.com>
Link: http://lore.kernel.org/lkml/20210517081254.1561564-1-yukuai3@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-06-01 10:56:27 -03:00
..
accounting
arch perf tools: Copy uapi/asm/perf_regs.h from the kernel for MIPS 2021-06-01 10:07:46 -03:00
bootconfig tools/bootconfig: Add tracing_on support to helper scripts 2021-01-14 10:32:20 -05:00
bpf bpftool: Add sock_release help info for cgroup attach/prog load command 2021-05-25 16:18:32 +02:00
build tools build: Fix quiet cmd indentation 2021-05-17 12:10:03 +09:00
cgroup tools/cgroup/slabinfo.py: updated to work on current kernel 2021-04-23 14:42:40 -07:00
debugging tools: Fix a typo in kernel-chktaint 2021-04-08 11:41:22 -06:00
edid
firewire
firmware
gpio tools: gpio-utils: fix various kernel-doc warnings 2021-03-26 14:56:19 +01:00
hv
iio iio: event_monitor: Enable events before monitoring 2021-03-25 19:13:52 +00:00
include ARM fixes: 2021-05-29 06:02:25 -10:00
io_uring
kvm/kvm_stat tools/kvm_stat: Fix documentation typo 2021-05-07 06:06:22 -04:00
laptop
leds
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2021-05-11 16:05:56 -07:00
memory-model doc: update rcu_dereference.rst reference 2021-04-06 14:45:04 +02:00
objtool objtool/x86: Fix elf_add_alternative() endianness 2021-05-12 21:17:01 +02:00
pci
pcmcia
perf perf stat: Fix error return code in bperf__load() 2021-06-01 10:56:27 -03:00
power Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2021-05-05 12:24:29 -07:00
scripts tools build: Fix quiet cmd indentation 2021-05-17 12:10:03 +09:00
spi spi: tools: make a symbolic link to the header file spi.h 2021-04-22 16:30:39 +01:00
testing ARM fixes: 2021-05-29 06:02:25 -10:00
thermal/tmon tools: do not include scripts/Kbuild.include 2021-04-25 05:26:13 +09:00
time
tracing tools/latency-collector: Remove unneeded semicolon 2021-03-18 12:58:26 -04:00
usb treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
virtio tools/virtio: add barrier for aarch64 2020-12-18 16:14:30 -05:00
vm
wmi
Makefile tracing/tools: Add the latency-collector to tools directory 2021-02-12 11:52:59 -05:00