]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: btf: avoid -Wreturn-type warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 25 May 2018 21:33:19 +0000 (23:33 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 28 May 2018 15:40:58 +0000 (17:40 +0200)
commit5f8ae8301c84aa3b740822a9dbfe66fed250f813
treeb8dcafa05c4731dbd10d7b0ea72440d10d13e2f3
parent8ec8a7f36665e0708c42244a85591fb8ec9c3b6c
bpf: btf: avoid -Wreturn-type warning

gcc warns about a noreturn function possibly returning in
some configurations:

kernel/bpf/btf.c: In function 'env_type_is_resolve_sink':
kernel/bpf/btf.c:729:1: error: control reaches end of non-void function [-Werror=return-type]

Using BUG() instead of BUG_ON() avoids that warning and otherwise
does the exact same thing.

Fixes: eff646e2238c ("bpf: btf: Validate type reference")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/btf.c