summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/bench.h
diff options
context:
space:
mode:
authorHou Tao <houtao1@huawei.com>2021-12-10 15:16:50 +0100
committerAlexei Starovoitov <ast@kernel.org>2021-12-12 02:40:23 +0100
commit9a93bf3fda3d03762868b1424e898395ffc71575 (patch)
tree9d1cb3f2255cb5f28cfbaaf8f4fd3213e9853608 /tools/testing/selftests/bpf/bench.h
parentbpf: Add bpf_strncmp helper (diff)
downloadlinux-9a93bf3fda3d03762868b1424e898395ffc71575.tar.xz
linux-9a93bf3fda3d03762868b1424e898395ffc71575.zip
selftests/bpf: Fix checkpatch error on empty function parameter
Fix checkpatch error: "ERROR: Bad function definition - void foo() should probably be void foo(void)". Most replacements are done by the following command: sed -i 's#\([a-z]\)()$#\1(void)#g' testing/selftests/bpf/benchs/*.c Signed-off-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20211210141652.877186-3-houtao1@huawei.com
Diffstat (limited to 'tools/testing/selftests/bpf/bench.h')
-rw-r--r--tools/testing/selftests/bpf/bench.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/testing/selftests/bpf/bench.h b/tools/testing/selftests/bpf/bench.h
index 50785503756b..fb3e213df3dc 100644
--- a/tools/testing/selftests/bpf/bench.h
+++ b/tools/testing/selftests/bpf/bench.h
@@ -38,8 +38,8 @@ struct bench_res {
struct bench {
const char *name;
- void (*validate)();
- void (*setup)();
+ void (*validate)(void);
+ void (*setup)(void);
void *(*producer_thread)(void *ctx);
void *(*consumer_thread)(void *ctx);
void (*measure)(struct bench_res* res);
@@ -54,7 +54,7 @@ struct counter {
extern struct env env;
extern const struct bench *bench;
-void setup_libbpf();
+void setup_libbpf(void);
void hits_drops_report_progress(int iter, struct bench_res *res, long delta_ns);
void hits_drops_report_final(struct bench_res res[], int res_cnt);
void false_hits_report_progress(int iter, struct bench_res *res, long delta_ns);
@@ -62,7 +62,8 @@ void false_hits_report_final(struct bench_res res[], int res_cnt);
void ops_report_progress(int iter, struct bench_res *res, long delta_ns);
void ops_report_final(struct bench_res res[], int res_cnt);
-static inline __u64 get_time_ns() {
+static inline __u64 get_time_ns(void)
+{
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);