Fix KFUNC_PROBE return value
authorMauricio Vásquez <mauricio@kinvolk.io>
Thu, 21 May 2020 16:50:52 +0000 (11:50 -0500)
committeryonghong-song <ys114321@gmail.com>
Thu, 21 May 2020 19:27:28 +0000 (12:27 -0700)
commit44e0f43eeac53648adb4734862f9b36d80853420
treefd5e6248795a7b319ecbd30294e4e98f379a81ff
parent74e66b4f6730e0708f97150ac23d5951c5684ff8
Fix KFUNC_PROBE return value

The KFUNC_PROBE macro is using "void" as return type, this is causing problems
in some tools that have a filtering enable that returns 0.

Reproducer: (Notice that it requires BTF support)

```
$ python opensnoop.py --pid 5
/virtual/main.c:33:21: error: void function '____kretfunc__do_sys_open' should not return a value [-Wreturn-type]
    if (pid != 5) { return 0; }
                    ^      ~
1 error generated.
...
```

Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
src/cc/export/helpers.h
tools/klockstat.py
tools/opensnoop.py