Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1545307
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 20/29] samples/bpf: Make perf_event_read() static |
| Date | 2016-12-20 18:20 +0100 |
| Message-ID | <sQwf0-8sT-23@gated-at.bofh.it> (permalink) |
| References | <sQw5j-8nS-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
While testing Joe's conversion of samples/bpf/ to use tools/lib/bpf/ I noticed
some warnings building samples/bpf/ on a Fedora Rawhide container, with
clang/llvm 3.9 I noticed this:
[root@1e797fdfbf4f linux]# make -j4 O=/tmp/build/linux/ samples/bpf/
make[1]: Entering directory '/tmp/build/linux'
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
Using /git/linux as source for kernel
<SNIP>
HOSTCC samples/bpf/trace_output_user.o
/git/linux/samples/bpf/trace_output_user.c:64:6: warning: no previous
prototype for 'perf_event_read' [-Wmissing-prototypes]
void perf_event_read(print_fn fn)
^~~~~~~~~~~~~~~
HOSTLD samples/bpf/trace_output
make[1]: Leaving directory '/tmp/build/linux'
Shut up the compiler by making that function static.
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Joe Stringer <joe@ovn.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20161215152927.GC6866@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
samples/bpf/trace_output_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/trace_output_user.c b/samples/bpf/trace_output_user.c
index 3bedd945def1..1a1da7bddb93 100644
--- a/samples/bpf/trace_output_user.c
+++ b/samples/bpf/trace_output_user.c
@@ -61,7 +61,7 @@ struct perf_event_sample {
char data[];
};
-void perf_event_read(print_fn fn)
+static void perf_event_read(print_fn fn)
{
__u64 data_tail = header->data_tail;
__u64 data_head = header->data_head;
--
2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/29] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 18:10 +0100 [PATCH 13/29] perf record: Force ignore_missing_thread for uid option Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 18:20 +0100 [PATCH 06/29] perf sched timehist: Add -I/--idle-hist option Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 18:20 +0100 [PATCH 21/29] perf trace: Check if MAP_32BIT is defined (again) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 18:20 +0100 [PATCH 05/29] perf sched timehist: Skip non-idle events when necessary Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 18:20 +0100 [PATCH 07/29] perf sched timehist: Show callchains for idle stat Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 18:20 +0100 [PATCH 09/29] perf mem: Fix --all-user/--all-kernel options Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 18:20 +0100 [PATCH 03/29] perf sched timehist: Introduce struct idle_time_data Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 18:20 +0100 [PATCH 08/29] perf tools: Remove some needless __maybe_unused Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 18:20 +0100 [PATCH 20/29] samples/bpf: Make perf_event_read() static Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 18:20 +0100 [PATCH 10/29] perf evsel: Use variable instead of repeating lengthy FD macro Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-20 18:20 +0100 Re: [GIT PULL 00/29] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-12-20 20:20 +0100
csiph-web