Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The function `bpf_diag_header` is declared `static` but is never called within `diagnostics.c`, which triggers a `-Wunused-function` compiler warning and breaks the build under `CONFIG_WERROR`.
--
--- Patch [1]: [PATCH bpf-next v5 01/14] bpf: Add verifier diagnostics report helpers ---
commit c8722c70a656e46b9e45b3b94e11be7487e49da9
Author: Kumar Kartikeya Dwivedi <[email protected]>
bpf: Add verifier diagnostics report helpers
This commit adds the initial diagnostics renderer for verifier reports and
wires it into the BPF build. It introduces helpers to emit common failure
headers through the verifier log.
> diff --git a/kernel/bpf/diagnostics.c b/kernel/bpf/diagnostics.c
> new file mode 100644
> index 0000000000000..e75753552a4dd
> --- /dev/null
> +++ b/kernel/bpf/diagnostics.c
[ ... ]
> +static void bpf_diag_header(struct bpf_verifier_env *env, const char *category,
> + const char *problem)
> +{
[Severity: Low]
Is this function intended to be exported or used within this file?
Because bpf_diag_header() is declared static and isn't called anywhere
within diagnostics.c, compiling with CONFIG_WERROR enabled triggers a
-Wunused-function compiler warning and breaks the build.
Could this function be exposed in diagnostics.h so other subsystems can use
it, or was a local caller omitted in this patch?
> + char first;
> +
> + if (!bpf_diag_enabled(env))
> + return;
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.