From: Andrii Nakryiko Date: Thu, 5 Sep 2024 21:05:20 +0000 (-0700) Subject: bpf: change int cmd argument in __sys_bpf into typed enum bpf_cmd X-Git-Tag: microblaze-v6.13~115^2~35 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=2db2b8cb8f96bb1def9904abbc859d95e3fbf99c;p=linux-2.6-microblaze.git bpf: change int cmd argument in __sys_bpf into typed enum bpf_cmd This improves BTF data recorded about this function and makes debugging/tracing better, because now command can be displayed as symbolic name, instead of obscure number. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240905210520.2252984-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov --- diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index fc62f5c4faf9..6988e432fc3d 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -5670,7 +5670,7 @@ static int token_create(union bpf_attr *attr) return bpf_token_create(attr); } -static int __sys_bpf(int cmd, bpfptr_t uattr, unsigned int size) +static int __sys_bpf(enum bpf_cmd cmd, bpfptr_t uattr, unsigned int size) { union bpf_attr attr; int err;