]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Wrap source argument of BPF_CORE_READ macro in parentheses
authorAndrii Nakryiko <andriin@fb.com>
Fri, 19 Jun 2020 23:17:01 +0000 (16:17 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 23 Jun 2020 00:01:48 +0000 (17:01 -0700)
commitdc8ad09ab9cd24460a0671870f7f747bb08d2892
treed2aa523039a2832c1495390a8137671c02562730
parentcb986a973fba9764752bb3df11af63e6f4b9b96b
libbpf: Wrap source argument of BPF_CORE_READ macro in parentheses

Wrap source argument of BPF_CORE_READ family of macros into parentheses to
allow uses like this:

BPF_CORE_READ((struct cast_struct *)src, a, b, c);

Fixes: 85cb98e88808 ("libbpf: Add BPF_CORE_READ/BPF_CORE_READ_INTO helpers")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200619231703.738941-8-andriin@fb.com
tools/lib/bpf/bpf_core_read.h