lkml.org 
[lkml]   [2018]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] bpf: clean up unused-variable warning
From
Date
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@arndb.de>

Now applied to bpf, thanks Arnd!

\
 
 \ /
  Last update: 2018-02-22 01:13    [W:0.028 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site