Re: [PATCH bpf-next] bpf: use MAX_BPF_FUNC_REGISTER_ARGS macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 22, 2021 at 01:25:31PM +0400, Dmitrii Banshchikov wrote:
> Instead of using integer literal here and there use macro name for
> better context.
> 
> Signed-off-by: Dmitrii Banshchikov <me@xxxxxxxxxxxxx>
> ---
>  include/linux/bpf.h   |  1 +
>  kernel/bpf/btf.c      | 25 ++++++++++++++-----------
>  kernel/bpf/verifier.c |  2 +-
>  3 files changed, 16 insertions(+), 12 deletions(-)
> 
> diff --git a/include/linux/bpf.h b/include/linux/bpf.h
> index cccaef1088ea..6946e8e6640a 100644
> --- a/include/linux/bpf.h
> +++ b/include/linux/bpf.h
> @@ -505,6 +505,7 @@ enum bpf_cgroup_storage_type {
>   * See include/trace/bpf_probe.h
>   */
>  #define MAX_BPF_FUNC_ARGS 12
> +#define MAX_BPF_FUNC_REGISTER_ARGS 5
nit. How about s/REGISTER/REG/?  REG is commonly used in the
current code.

A few word comment will be useful also to avoid confusion with
the MAX_BPF_FUNC_ARGS above.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux