aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/test_jhash.h
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2019-07-02 20:26:51 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2019-07-03 15:06:33 +0200
commitd2f5bbbc350050895d9f33c2744a61f9e0af1caa (patch)
tree16c2e73e7fccf67fdb0802634eaff677bf4c1055 /tools/testing/selftests/bpf/progs/test_jhash.h
parentbpf: Add support for fq's EDT to HBM (diff)
downloadlinux-dev-d2f5bbbc350050895d9f33c2744a61f9e0af1caa.tar.xz
linux-dev-d2f5bbbc350050895d9f33c2744a61f9e0af1caa.zip
selftests: bpf: standardize to static __always_inline
The progs for bpf selftests use several different notations to force function inlining. Standardize to what most of them use, static __always_inline. Suggested-by: Song Liu <liu.song.a23@gmail.com> Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_jhash.h')
-rw-r--r--tools/testing/selftests/bpf/progs/test_jhash.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_jhash.h b/tools/testing/selftests/bpf/progs/test_jhash.h
index 3d12c11a8d47..c300734d26f6 100644
--- a/tools/testing/selftests/bpf/progs/test_jhash.h
+++ b/tools/testing/selftests/bpf/progs/test_jhash.h
@@ -1,9 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2019 Facebook
+#include <features.h>
typedef unsigned int u32;
-static __attribute__((always_inline)) u32 rol32(u32 word, unsigned int shift)
+static __always_inline u32 rol32(u32 word, unsigned int shift)
{
return (word << shift) | (word >> ((-shift) & 31));
}