treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / tools / testing / selftests / bpf / progs / test_skeleton.c
blobde03a90f78caa13eba7fd369bee74c51b701ca57
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2019 Facebook */
4 #include <stdbool.h>
5 #include <linux/bpf.h>
6 #include <bpf/bpf_helpers.h>
8 struct s {
9 int a;
10 long long b;
11 } __attribute__((packed));
13 int in1 = 0;
14 long long in2 = 0;
15 char in3 = '\0';
16 long long in4 __attribute__((aligned(64))) = 0;
17 struct s in5 = {};
19 long long out2 = 0;
20 char out3 = 0;
21 long long out4 = 0;
22 int out1 = 0;
24 extern bool CONFIG_BPF_SYSCALL __kconfig;
25 extern int LINUX_KERNEL_VERSION __kconfig;
26 bool bpf_syscall = 0;
27 int kern_ver = 0;
29 SEC("raw_tp/sys_enter")
30 int handler(const void *ctx)
32 static volatile struct s out5;
34 out1 = in1;
35 out2 = in2;
36 out3 = in3;
37 out4 = in4;
38 out5 = in5;
40 bpf_syscall = CONFIG_BPF_SYSCALL;
41 kern_ver = LINUX_KERNEL_VERSION;
43 return 0;
46 char _license[] SEC("license") = "GPL";