Thread (11 messages) 11 messages, 6 authors, 2020-03-20

Re: [PATCH bpf-next] bpf: tcp: Fix unused function warnings

From: Yuehaibing <hidden>
Date: 2020-03-20 02:33:23
Also in: bpf, lkml

On 2020/3/20 1:00, Jakub Sitnicki wrote:
On Thu, Mar 19, 2020 at 01:46 PM CET, YueHaibing wrote:
quoted
If BPF_STREAM_PARSER is not set, gcc warns:

net/ipv4/tcp_bpf.c:483:12: warning: 'tcp_bpf_sendpage' defined but not used [-Wunused-function]
net/ipv4/tcp_bpf.c:395:12: warning: 'tcp_bpf_sendmsg' defined but not used [-Wunused-function]
net/ipv4/tcp_bpf.c:13:13: warning: 'tcp_bpf_stream_read' defined but not used [-Wunused-function]

Moves the unused functions into the #ifdef

Reported-by: Hulk Robot <redacted>
Signed-off-by: YueHaibing <redacted>
---
In addition to this fix, looks like tcp_bpf_recvmsg can be static and
also conditional on CONFIG_BPF_STREAM_PARSER.
Thanks, will do this in next version.
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>

.
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help