Re: [PATCH v2] perf clang-format: Add a perf clang-format that overrides some kernel behaviors

From: Arnaldo Carvalho de Melo

Date: Wed May 20 2026 - 15:30:26 EST


On Wed, May 20, 2026 at 08:37:24AM -0700, Ian Rogers wrote:
> On Mon, Apr 27, 2026 at 11:54 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
> >
> > In particular, header file ordering is an issue in the tools/perf
> > directory given the larger number of depended upon libraries.
> >
> > The order of header file includes was proposed in:
> > https://lore.kernel.org/linux-perf-users/CAP-5=fUitzKwJONTngiW17XkS7kVr2cDS4cDL_HccJKcnR2EgQ@xxxxxxxxxxxxxx/
> >
> > Sorting headers is desirable to avoid issues like duplicate includes.
> >
> > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> > ---
> > v2: Move the .clang-format file under tools/perf rather than tools/.
>
> This change helps format header files in tools/perf, otherwise
> following the parent linux clang-format options. Could we land this in
> perf-tools-next?

Thanks, applied to perf-tools-next, for v7.2.

- Arnaldo