]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
clang-format: fix formatting of guard() and scoped_guard() statements
authorBart Van Assche <bvanassche@acm.org>
Mon, 13 Apr 2026 18:23:48 +0000 (11:23 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 May 2026 04:24:41 +0000 (21:24 -0700)
Without this patch clang-format formats guard() and scoped_guard()
statements as follows:

guard(...)(...)
{
...
}

With this patch clang-format formats guard() and scoped_guard()
statements as follows:

guard(...)(...) {
...
}

Link: https://lore.kernel.org/20260413182348.1865138-1-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
.clang-format

index 1cc151e2adcc5ec9658f1a8a21648b6564acc9e0..6a3de86ab27a4fdc824a04277319faf890e99ddb 100644 (file)
@@ -481,6 +481,7 @@ 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'
@@ -674,6 +675,7 @@ ForEachMacros:
   - 'rq_list_for_each'
   - 'rq_list_for_each_safe'
   - 'sample_read_group__for_each'
+  - 'scoped_guard'
   - 'scsi_for_each_prot_sg'
   - 'scsi_for_each_sg'
   - 'sctp_for_each_hentry'