Re: [PATCH v1] clang-format: Fix formatting of guard()

From: Mickaël Salaün

Date: Wed Jul 08 2026 - 08:41:01 EST


On Wed, Jul 08, 2026 at 01:31:47PM +0200, Miguel Ojeda wrote:
> On Wed, Jul 8, 2026 at 1:20 PM Mickaël Salaün <mic@xxxxxxxxxxx> wrote:
> >
> > Ok, so the guard/scoped_guard changes will disappear once you refreshed
> > the .clang-format file. This means that I should not apply the Landlock
> > changes [1] right?
>
> It would disappear, but that is why I said that we could have a
> section of the list that is for explicitly-added entries, where we
> could add `scoped_guard` back.
>
> So we could 1) apply your patch, 2) have a patch to add a new section
> of the list with the `scoped_guard` entry and a comment, 3) update the
> main list, keeping that new section below or above.

OK, that makes sense. :)

>
> (If you want to send that series, please feel free, of course!)

I guess parts 2 and 3 should probably be send for v7.13 (it's a big
patch) whereas part 1 in 7.12-rcX, so I'll let you handle that properly.

>
> Does that clarify?

Yes, thanks. I'll keep the Landlock-specific patch I sent.

>
> Having said that, `clang-format` is not enforced (unlike `rustfmt`),
> so you could apply your patch (or not) independently.

Yes, but I enforce it for Landlock, which helps a lot:
- security/landlock/
- include/uapi/linux/landlock.h
- tools/testing/selftests/landlock/
- samples/landlock/

Regards,
Mickaël