diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-01-16 15:51:46 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-01-17 01:15:05 +0100 |
commit | 48b325632641da27a241912d66b38a1221ab425f (patch) | |
tree | 50b2ed3d52213cc7ae791f9a95639868a1b0bc55 /kernel | |
parent | 0a2d28ff516c48a21c1e3be1ff7fba3e94248baa (diff) | |
download | talos-obmc-linux-48b325632641da27a241912d66b38a1221ab425f.tar.gz talos-obmc-linux-48b325632641da27a241912d66b38a1221ab425f.zip |
bpf: annotate bpf_insn_print_t with __printf
Functions of type bpf_insn_print_t take printf-like format
string, mark the type accordingly.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/bpf/disasm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/bpf/disasm.h b/kernel/bpf/disasm.h index e0857d016f89..266fe8ee542b 100644 --- a/kernel/bpf/disasm.h +++ b/kernel/bpf/disasm.h @@ -29,8 +29,8 @@ extern const char *const bpf_class_string[8]; const char *func_id_name(int id); -typedef void (*bpf_insn_print_t)(struct bpf_verifier_env *env, - const char *, ...); +typedef __printf(2, 3) void (*bpf_insn_print_t)(struct bpf_verifier_env *env, + const char *, ...); typedef const char *(*bpf_insn_revmap_call_t)(void *private_data, const struct bpf_insn *insn); typedef const char *(*bpf_insn_print_imm_t)(void *private_data, |