Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The static functions `bpf_diag_source` and `bpf_diag_header` are defined but never called, triggering `-Wunused-function` compiler warnings.
--
--- Patch [2]: [PATCH bpf-next v5 02/14] bpf: Add source and instruction diagnostic context ---
commit 6b6d98a70f5ed23a50572323329ceb65edc00d2e
Author: Kumar Kartikeya Dwivedi <[email protected]>
bpf: Add source and instruction diagnostic context
This commit teaches the verifier diagnostics to annotate an instruction with
BTF source line information and nearby BPF instructions. The renderer keeps
source text in a fixed-width lane and prints instructions in a stable
right-hand gutter.
> diff --git a/kernel/bpf/diagnostics.c b/kernel/bpf/diagnostics.c
> index e75753552a4dd..815aa7938b502 100644
> --- a/kernel/bpf/diagnostics.c
> +++ b/kernel/bpf/diagnostics.c
[ ... ]
> +static void bpf_diag_header(struct bpf_verifier_env *env, const char *category,
> + const char *problem)
> +{
[Severity: Low]
This isn't a bug, but are there plans to call this function later in the
patch series? It is defined as static but never called in this compilation
unit, which can trigger a -Wunused-function warning and break builds that
are compiled with -Werror.
[ ... ]
> +static void bpf_diag_source(struct bpf_verifier_env *env, u32 insn_idx, const char *label,
> + const char *fmt, ...)
> +{
[Severity: Low]
This isn't a bug, but this function also appears to be unused in this patch.
Could this cause the same compiler warning for unused static functions?
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
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.