summaryrefslogtreecommitdiff
path: root/tools/lib
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2023-01-28 03:06:40 +0300
committerAlexei Starovoitov <ast@kernel.org>2023-01-28 23:45:14 +0300
commite85465e420be1e408f9465f8b6fd9e2f7b17aea1 (patch)
tree10a9743618953d6e59c25345b7a7c76c6d3e68c0 /tools/lib
parent1b5e385325810b23e4e8d46f97d0e2e838e26802 (diff)
downloadlinux-e85465e420be1e408f9465f8b6fd9e2f7b17aea1.tar.xz
libbpf: Simplify barrier_var()
Use a single "+r" constraint instead of the separate "=r" and "0". Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Link: https://lore.kernel.org/r/20230128000650.1516334-22-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/bpf/bpf_helpers.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
index d37c4fe2849d..5ec1871acb2f 100644
--- a/tools/lib/bpf/bpf_helpers.h
+++ b/tools/lib/bpf/bpf_helpers.h
@@ -109,7 +109,7 @@
* This is a variable-specific variant of more global barrier().
*/
#ifndef barrier_var
-#define barrier_var(var) asm volatile("" : "=r"(var) : "0"(var))
+#define barrier_var(var) asm volatile("" : "+r"(var))
#endif
/*