[PATCH v1] clang-format: Fix formatting of guard()
From: Mickaël Salaün
Date: Wed Jul 08 2026 - 06:59:16 EST
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@xxxxxxxxxxxxxxxxxxxx>
Cc: Bart Van Assche <bvanassche@xxxxxxx>
Cc: Günther Noack <gnoack@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Fixes: 99df2a8eba34 ("clang-format: fix formatting of guard() and scoped_guard() statements")
Closes: https://lore.kernel.org/r/20260702.Eibibi4the9j@xxxxxxxxxxx
Signed-off-by: Mickaël Salaün <mic@xxxxxxxxxxx>
---
.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