mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
UPSTREAM: bpf: Fix build warning regarding missing prototypes
Fix build warnings when building net/bpf/test_run.o with W=1 due
to missing prototype for bpf_fentry_test{1..6}.
Instead of declaring prototypes, turn off warnings with
__diag_{push,ignore,pop} as pointed out by Alexei.
Change-Id: I1c00daf9ae275bc4c207ccdbad0a564ba1d8fa18
Signed-off-by: Jean-Philippe Menil <jpmenil@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200327204713.28050-1-jpmenil@gmail.com
This commit is contained in:
parent
44be32b913
commit
7aad38691e
1 changed files with 4 additions and 0 deletions
|
|
@ -114,6 +114,9 @@ out:
|
|||
* architecture dependent calling conventions. 7+ can be supported in the
|
||||
* future.
|
||||
*/
|
||||
__diag_push();
|
||||
__diag_ignore(GCC, 8, "-Wmissing-prototypes",
|
||||
"Global functions as their definitions will be in vmlinux BTF");
|
||||
int noinline bpf_fentry_test1(int a)
|
||||
{
|
||||
return a + 1;
|
||||
|
|
@ -149,6 +152,7 @@ int noinline bpf_modify_return_test(int a, int *b)
|
|||
*b += 1;
|
||||
return a + *b;
|
||||
}
|
||||
__diag_pop();
|
||||
|
||||
ALLOW_ERROR_INJECTION(bpf_modify_return_test, ERRNO);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue