mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: "Mickaël Salaün" <mic@digikod.net>,
	linux-kernel@vger.kernel.org,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Bart Van Assche" <bvanassche@acm.org>,
	"Günther Noack" <gnoack@google.com>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>
Subject: [PATCH v1] clang-format: Fix formatting of guard()
Date: Wed,  8 Jul 2026 12:57:10 +0200	[thread overview]
Message-ID: <20260708105713.2073335-1-mic@digikod.net> (raw)

The previous fix was overzealous and included guard() along with
scoped_guard(), but only the later takes curly braces.

The original fix introduced this issue:
-       guard(rcu)();
+       guard(rcu)
+               ();

This is especially visible with security/landlock/*.[ch] which is fully
formatted with clang-format.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Günther Noack <gnoack@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: 99df2a8eba34 ("clang-format: fix formatting of guard() and scoped_guard() statements")
Closes: https://lore.kernel.org/r/20260702.Eibibi4the9j@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
---
 .clang-format | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.clang-format b/.clang-format
index 6a3de86ab27a..14b44703e0a9 100644
--- a/.clang-format
+++ b/.clang-format
@@ -481,7 +481,6 @@ ForEachMacros:
   - 'genradix_for_each'
   - 'genradix_for_each_from'
   - 'genradix_for_each_reverse'
-  - 'guard'
   - 'hash_for_each'
   - 'hash_for_each_possible'
   - 'hash_for_each_possible_rcu'
-- 
2.54.0


             reply	other threads:[~2026-07-08 10:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 10:57 Mickaël Salaün [this message]
2026-07-08 11:06 ` Miguel Ojeda
2026-07-08 11:10   ` Mickaël Salaün
2026-07-08 11:11     ` Miguel Ojeda
2026-07-08 11:20       ` Mickaël Salaün
2026-07-08 11:31         ` Miguel Ojeda
2026-07-08 12:34           ` Mickaël Salaün
2026-07-08 12:49             ` Miguel Ojeda
2026-08-28 14:11               ` Mickaël Salaün
2026-08-30 10:09                 ` Miguel Ojeda
2026-09-03 17:31                   ` Mickaël Salaün
2026-07-08 15:48 ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260708105713.2073335-1-mic@digikod.net \
    --to=mic@digikod.net \
    --cc=akpm@linux-foundation.org \
    --cc=bvanassche@acm.org \
    --cc=gnoack@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®