On 4/12/22 8:39 AM, Mickaël Salaün wrote:
Add tools/ to the shell fragment generating the for_each list and update
it. This is useful to format files in the tools directory (e.g.
selftests) with the same coding style as the kernel.
Cc: Miguel Ojeda <ojeda@xxxxxxxxxx>
Signed-off-by: Mickaël Salaün <mic@xxxxxxxxxxx>
Link: https://lore.kernel.org/r/20220412153906.428179-1-mic@xxxxxxxxxxx
---
.clang-format | 177 ++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 149 insertions(+), 28 deletions(-)
diff --git a/.clang-format b/.clang-format
index fa959436bcfd..70d4e7ec4cf9 100644
--- a/.clang-format
+++ b/.clang-format
@@ -65,36 +65,53 @@ ExperimentalAutoDetectBinPacking: false
#FixNamespaceComments: false # Unknown to clang-format-4.0
# Taken from:
-# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ \
+# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ tools/ \
# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
# | sort | uniq
ForEachMacros:
+ - '__ata_qc_for_each'
+ - '__bio_for_each_bvec'
+ - '__bio_for_each_segment'
+ - '__evlist__for_each_entry'
+ - '__evlist__for_each_entry_continue'
+ - '__evlist__for_each_entry_from'
+ - '__evlist__for_each_entry_reverse'
+ - '__evlist__for_each_entry_safe'
+ - '__for_each_mem_range'
+ - '__for_each_mem_range_rev'
+ - '__for_each_thread'
+ - '__hlist_for_each_rcu'
+ - '__map__for_each_symbol_by_name'
+ - '__perf_evlist__for_each_entry'
+ - '__perf_evlist__for_each_entry_reverse'
+ - '__perf_evlist__for_each_entry_safe'
+ - '__rq_for_each_bio'
+ - '__shost_for_each_device'
- 'apei_estatus_for_each_section'
- 'ata_for_each_dev'
- 'ata_for_each_link'
- - '__ata_qc_for_each'
Several macros were removed.
Is this intentional ?