Re: [PATCH v5 05/26] perf annotate: Normalize arch__dwarf_regnum() error return values

From: Namhyung Kim

Date: Wed Sep 09 2026 - 11:45:07 EST


On Tue, Sep 08, 2026 at 10:57:11AM -0700, Ian Rogers wrote:
> On Tue, Sep 8, 2026 at 6:05 AM Tengda Wu <wutengda@xxxxxxxxxxxxxxx> wrote:
> >
> > arch__dwarf_regnum() returns inconsistent error values: early path
> > returns -1 while the main lookup returns -ENOENT/-EINVAL from
> > get_dwarf_regnum(). Callers only check for -1, so genuine failures
> > can slip through.
> >
> > Normalize all failures to -1 to match the callers' expectation.
>
> This sounds like a bug in the callers but this function is local to
> annotate.c and is just a convenience so:

Agreed.

Reviewed-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Thanks,
Namhyung