From: tip-bot for Arnaldo Carvalho de Melo <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: arnaldo.melo@gmail.com, hpa@zytor.com, acme@redhat.com,
daniel@iogearbox.net, tglx@linutronix.de, ast@fb.com,
mingo@kernel.org, wangnan0@huawei.com, joe@ovn.org,
linux-kernel@vger.kernel.org
Subject: [tip:perf/urgent] samples/bpf: Make perf_event_read() static
Date: Tue, 20 Dec 2016 11:28:39 -0800 [thread overview]
Message-ID: <tip-96c2fb69b92fcf6006dfb3017d6d887f8321407b@git.kernel.org> (raw)
In-Reply-To: <20161215152927.GC6866@kernel.org>
Commit-ID: 96c2fb69b92fcf6006dfb3017d6d887f8321407b
Gitweb: http://git.kernel.org/tip/96c2fb69b92fcf6006dfb3017d6d887f8321407b
Author: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
AuthorDate: Thu, 15 Dec 2016 12:29:27 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 20 Dec 2016 09:37:33 -0300
samples/bpf: Make perf_event_read() static
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 3bedd94..1a1da7b 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;
prev parent reply other threads:[~2016-12-20 19:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-15 15:29 [PATCH] sample/bpf: Make perf_event_read() static Arnaldo Carvalho de Melo
2016-12-15 15:49 ` Daniel Borkmann
2016-12-15 15:54 ` Arnaldo Carvalho de Melo
2016-12-20 19:28 ` tip-bot for Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-96c2fb69b92fcf6006dfb3017d6d887f8321407b@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=arnaldo.melo@gmail.com \
--cc=ast@fb.com \
--cc=daniel@iogearbox.net \
--cc=hpa@zytor.com \
--cc=joe@ovn.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).