[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzY597=GXirqXzvps+-SbCXohTR-9=hDOxzXdZ9+HUieGQ@mail.gmail.com>
Date: Tue, 22 Oct 2019 11:45:07 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: "Ben Dooks (Codethink)" <ben.dooks@...ethink.co.uk>
Cc: linux-kernel@...ts.codethink.co.uk,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] xdp: fix type of string pointer in __XDP_ACT_SYM_TAB
On Tue, Oct 22, 2019 at 6:51 AM Ben Dooks (Codethink)
<ben.dooks@...ethink.co.uk> wrote:
>
> The table entry in __XDP_ACT_SYM_TAB for the last item is set
> to { -1, 0 } where it should be { -1, NULL } as the second item
> is a pointer to a string.
>
> Fixes the following sparse warnings:
>
> ./include/trace/events/xdp.h:28:1: warning: Using plain integer as NULL pointer
> ./include/trace/events/xdp.h:53:1: warning: Using plain integer as NULL pointer
> ./include/trace/events/xdp.h:82:1: warning: Using plain integer as NULL pointer
> ./include/trace/events/xdp.h:140:1: warning: Using plain integer as NULL pointer
> ./include/trace/events/xdp.h:155:1: warning: Using plain integer as NULL pointer
> ./include/trace/events/xdp.h:190:1: warning: Using plain integer as NULL pointer
> ./include/trace/events/xdp.h:225:1: warning: Using plain integer as NULL pointer
> ./include/trace/events/xdp.h:260:1: warning: Using plain integer as NULL pointer
> ./include/trace/events/xdp.h:318:1: warning: Using plain integer as NULL pointer
> ./include/trace/events/xdp.h:356:1: warning: Using plain integer as NULL pointer
> ./include/trace/events/xdp.h:390:1: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Ben Dooks (Codethink) <ben.dooks@...ethink.co.uk>
> ---
Acked-by: Andrii Nakryiko <andriin@...com>
> Cc: Alexei Starovoitov <ast@...nel.org>
> Cc: Daniel Borkmann <daniel@...earbox.net>
> Cc: Martin KaFai Lau <kafai@...com>
> Cc: Song Liu <songliubraving@...com>
> Cc: Yonghong Song <yhs@...com>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Jakub Kicinski <jakub.kicinski@...ronome.com>
> Cc: Jesper Dangaard Brouer <hawk@...nel.org>
> Cc: John Fastabend <john.fastabend@...il.com>
> Cc: netdev@...r.kernel.org
> Cc: bpf@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> ---
> include/trace/events/xdp.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h
> index 8c8420230a10..c7e3c9c5bad3 100644
> --- a/include/trace/events/xdp.h
> +++ b/include/trace/events/xdp.h
> @@ -22,7 +22,7 @@
> #define __XDP_ACT_SYM_FN(x) \
> { XDP_##x, #x },
> #define __XDP_ACT_SYM_TAB \
> - __XDP_ACT_MAP(__XDP_ACT_SYM_FN) { -1, 0 }
> + __XDP_ACT_MAP(__XDP_ACT_SYM_FN) { -1, NULL }
> __XDP_ACT_MAP(__XDP_ACT_TP_FN)
>
> TRACE_EVENT(xdp_exception,
> --
> 2.23.0
>
Powered by blists - more mailing lists