Re: [PATCH bpf-next] bpf: hide the unused 'off' variable

From: Arnd Bergmann
Date: Tue May 29 2018 - 06:35:26 EST


On Tue, May 29, 2018 at 4:40 AM, YueHaibing <yuehaibing@xxxxxxxxxx> wrote:
> The local variable is only used while CONFIG_IPV6 enabled
>
> net/core/filter.c: In function âsk_msg_convert_ctx_accessâ:
> net/core/filter.c:6489:6: warning: unused variable âoffâ [-Wunused-variable]
> int off;
> ^
> This puts it into #ifdef.
>
> Fixes: 303def35f64e ("bpf: allow sk_msg programs to read sock fields")
> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>

I was about to send the same patch and found you had already sent one.

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>