lkml.org 
[lkml]   [2020]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH bpf-next] bpf: tcp: Fix unused function warnings
On Thu, Mar 19, 2020 at 10:00 AM Jakub Sitnicki <jakub@cloudflare.com> wrote:
>
> On Thu, Mar 19, 2020 at 01:46 PM CET, YueHaibing wrote:
> > 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 <hulkci@huawei.com>
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > ---
>
> In addition to this fix, looks like tcp_bpf_recvmsg can be static and
> also conditional on CONFIG_BPF_STREAM_PARSER.
>
> Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>

Fixes tag is missing as well?

\
 
 \ /
  Last update: 2020-03-19 18:39    [W:0.088 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site