[PATCH v6 00/27] Constify tool pointers

Arnaldo Carvalho de Melo acme at kernel.org
Mon Aug 12 12:54:53 PDT 2024


On Mon, Aug 12, 2024 at 11:10:02AM -0700, Ian Rogers wrote:
> On Mon, Aug 12, 2024 at 6:53 AM Arnaldo Carvalho de Melo
> <acme at kernel.org> wrote:
> >
> > On Fri, Jul 19, 2024 at 09:26:57AM -0700, Ian Rogers wrote:
> > > On Fri, Jul 19, 2024 at 1:51 AM Adrian Hunter <adrian.hunter at intel.com> wrote:
> > > >
> > > > On 18/07/24 03:59, Ian Rogers wrote:
> > > > > struct perf_tool provides a set of function pointers that are called
> > > > > through when processing perf data. To make filling the pointers less
> > > > > cumbersome, if they are NULL perf_tools__fill_defaults will add
> > > > > default do nothing implementations.
> > > > >
> > > > > This change refactors struct perf_tool to have an init function that
> > > > > provides the default implementation. The special use of NULL and
> > > > > perf_tools__fill_defaults are removed. As a consequence the tool
> > > > > pointers can then all be made const, which better reflects the
> > > > > behavior a particular perf command would expect of the tool and to
> > > > > some extent can reduce the cognitive load on someone working on a
> > > > > command.
> > > > >
> > > > > v6: Rebase adding Adrian's reviewed-by/tested-by and Leo's tested-by.
> > > >
> > > > The tags were really meant only for patch 1, the email that was replied to.
> > > >
> > > > But now for patches 2 and 3:
> > > >
> > > > Reviewed-by: Adrian Hunter <adrian.hunter at intel.com>
> >
> > Applied 1-3, 4 is not applying, I'll look at it later.
> 
> I have a rebase and can resend. I haven't addressed Adrian's feedback

Please resend then.

- Arnaldo

> as I prefer callers of the tool function pointers not to have to do
> NULL tests, I'm trying to minimize spaghetti. Not sure if you're
> applying the whole series here or just the beginning.
> 
> Thanks,
> Ian



More information about the linux-arm-kernel mailing list