All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] clang-format: Fix formatting of guard()
@ 2026-07-08 10:57 Mickaël Salaün
  2026-07-08 11:06 ` Miguel Ojeda
  2026-07-08 15:48 ` Bart Van Assche
  0 siblings, 2 replies; 9+ messages in thread
From: Mickaël Salaün @ 2026-07-08 10:57 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Mickaël Salaün, linux-kernel, Nathan Chancellor,
	Andrew Morton, Bart Van Assche, Günther Noack, Ingo Molnar,
	Peter Zijlstra

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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-07-08 15:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 10:57 [PATCH v1] clang-format: Fix formatting of guard() Mickaël Salaün
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-07-08 15:48 ` Bart Van Assche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.