bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin KaFai Lau <kafai@fb.com>
To: Dmitrii Banshchikov <me@ubique.spb.ru>
Cc: <bpf@vger.kernel.org>, <ast@kernel.org>, <daniel@iogearbox.net>,
	<andrii@kernel.org>, <songliubraving@fb.com>, <yhs@fb.com>,
	<john.fastabend@gmail.com>, <kpsingh@chromium.org>, <rdna@fb.com>
Subject: Re: [PATCH bpf-next] bpf: use MAX_BPF_FUNC_REGISTER_ARGS macro
Date: Mon, 22 Feb 2021 14:11:32 -0800	[thread overview]
Message-ID: <20210222221132.brp4iuc744qfzbzk@kafai-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <20210222092531.162654-1-me@ubique.spb.ru>

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@ubique.spb.ru>
> ---
>  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.

      reply	other threads:[~2021-02-22 22:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22  9:25 [PATCH bpf-next] bpf: use MAX_BPF_FUNC_REGISTER_ARGS macro Dmitrii Banshchikov
2021-02-22 22:11 ` Martin KaFai Lau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210222221132.brp4iuc744qfzbzk@kafai-mbp.dhcp.thefacebook.com \
    --to=kafai@fb.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kpsingh@chromium.org \
    --cc=me@ubique.spb.ru \
    --cc=rdna@fb.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).