[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ff1ed591-ae28-3d31-1004-5649f04f4d58@iogearbox.net>
Date: Thu, 22 Feb 2018 01:12:44 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: Arnd Bergmann <arnd@...db.de>, Alexei Starovoitov <ast@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>,
John Fastabend <john.fastabend@...il.com>,
Lawrence Brakmo <brakmo@...com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bpf: clean up unused-variable warning
On 02/20/2018 11:07 PM, Arnd Bergmann wrote:
> The only user of this variable is inside of an #ifdef, causing
> a warning without CONFIG_INET:
>
> net/core/filter.c: In function '____bpf_sock_ops_cb_flags_set':
> net/core/filter.c:3382:6: error: unused variable 'val' [-Werror=unused-variable]
> int val = argval & BPF_SOCK_OPS_ALL_CB_FLAGS;
>
> This replaces the #ifdef with a nicer IS_ENABLED() check that
> makes the code more readable and avoids the warning.
>
> Fixes: b13d88072172 ("bpf: Adds field bpf_sock_ops_cb_flags to tcp_sock")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Now applied to bpf, thanks Arnd!
Powered by blists - more mailing lists