BPF List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next 1/4] libbpf: Add bpf_program__add_flags() and bpf_program__clear_flags()
Date: Thu, 03 Sep 2026 09:30:32 +0000	[thread overview]
Message-ID: <20260903093033.31EA51F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260903092416.223294-1-toke@redhat.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The newly added multi-line comment in `libbpf.h` violates the required BPF subsystem comment style.
--

commit 0677df91f2b2dedb24874db25663854a4619dfdd
Author: Toke Høiland-Jørgensen <toke@redhat.com>

libbpf: Add bpf_program__add_flags() and bpf_program__clear_flags()

This commit introduces two convenience helpers, bpf_program__add_flags() and
bpf_program__clear_flags(), to non-destructively add or remove BPF program
flags. These wrap the existing bpf_program__set_flags() using bitwise
operations to avoid clobbering existing flags.

> diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h
> index b965ad5715403..3932bf9cb4903 100644
> --- a/tools/lib/bpf/libbpf.h
> +++ b/tools/lib/bpf/libbpf.h
[ ... ]
> @@ -1011,6 +1011,12 @@ bpf_program__set_expected_attach_type(struct bpf_program *prog,
>  LIBBPF_API __u32 bpf_program__flags(const struct bpf_program *prog);
>  LIBBPF_API int bpf_program__set_flags(struct bpf_program *prog, __u32 flags);
>  
> +/* Convenience helpers to non-destructively add or clear the specified flags
> + * instead of clobbering them as bpf_program__set_flags() does.
> + */

[Severity: Low]
This isn't a bug, but does this newly added multi-line comment violate the BPF
subsystem comment style? In the BPF subsystem, multi-line comments should have
the opening /* on its own line, with the comment text starting on the next
line.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260903092416.223294-1-toke@redhat.com?part=1

      parent reply	other threads:[~2026-09-03  9:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03  9:24 [PATCH bpf-next 1/4] libbpf: Add bpf_program__add_flags() and bpf_program__clear_flags() Toke Høiland-Jørgensen
2026-09-03  9:24 ` [PATCH bpf-next 2/4] selftests/bpf: Add assertions for bpf_program__{add,clear}_flags() Toke Høiland-Jørgensen
2026-09-03  9:32   ` sashiko-bot
2026-09-03  9:24 ` [PATCH bpf-next 3/4] selftests/bpf: Adopt bpf_program__add_flags() helper Toke Høiland-Jørgensen
2026-09-03  9:24 ` [PATCH bpf-next 4/4] bpftool: " Toke Høiland-Jørgensen
2026-09-03  9:30 ` sashiko-bot [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=20260903093033.31EA51F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=toke@redhat.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