.clang-format 21.7 KB
Newer Older
1 2
# SPDX-License-Identifier: GPL-2.0
#
3
# clang-format configuration file. Intended for clang-format >= 11.
4 5 6
#
# For more information, see:
#
7
#   Documentation/dev-tools/clang-format.rst
8 9 10 11 12 13 14 15
#   https://clang.llvm.org/docs/ClangFormat.html
#   https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
---
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
16
AlignEscapedNewlines: Left
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
  AfterClass: false
  AfterControlStatement: false
  AfterEnum: false
  AfterFunction: true
  AfterNamespace: true
  AfterObjCDeclaration: false
  AfterStruct: false
  AfterUnion: false
40
  AfterExternBlock: false
41 42 43
  BeforeCatch: false
  BeforeElse: false
  IndentBraces: false
44 45 46
  SplitEmptyFunction: true
  SplitEmptyRecord: true
  SplitEmptyNamespace: true
47 48
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
49
BreakBeforeInheritanceComma: false
50 51
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
52
BreakConstructorInitializers: BeforeComma
53 54 55 56
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
57
CompactNamespaces: false
58 59 60 61 62 63 64
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
65
FixNamespaceComments: false
66 67

# Taken from:
68
#   git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ tools/ \
69
#   | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$,  - '\1'," \
70
#   | LC_ALL=C sort -u
71
ForEachMacros:
72 73 74
  - '__ata_qc_for_each'
  - '__bio_for_each_bvec'
  - '__bio_for_each_segment'
75 76 77 78 79
  - '__evlist__for_each_entry'
  - '__evlist__for_each_entry_continue'
  - '__evlist__for_each_entry_from'
  - '__evlist__for_each_entry_reverse'
  - '__evlist__for_each_entry_safe'
80 81 82 83
  - '__for_each_mem_range'
  - '__for_each_mem_range_rev'
  - '__for_each_thread'
  - '__hlist_for_each_rcu'
84
  - '__map__for_each_symbol_by_name'
85 86 87 88
  - '__pci_bus_for_each_res0'
  - '__pci_bus_for_each_res1'
  - '__pci_dev_for_each_res0'
  - '__pci_dev_for_each_res1'
89 90 91
  - '__perf_evlist__for_each_entry'
  - '__perf_evlist__for_each_entry_reverse'
  - '__perf_evlist__for_each_entry_safe'
92 93
  - '__rq_for_each_bio'
  - '__shost_for_each_device'
94
  - '__sym_for_each'
95 96 97
  - 'apei_estatus_for_each_section'
  - 'ata_for_each_dev'
  - 'ata_for_each_link'
98 99 100
  - 'ata_qc_for_each'
  - 'ata_qc_for_each_raw'
  - 'ata_qc_for_each_with_internal'
101 102
  - 'ax25_for_each'
  - 'ax25_uid_for_each'
103
  - 'bio_for_each_bvec'
104
  - 'bio_for_each_bvec_all'
105
  - 'bio_for_each_folio_all'
106 107 108 109 110 111 112
  - 'bio_for_each_integrity_vec'
  - 'bio_for_each_segment'
  - 'bio_for_each_segment_all'
  - 'bio_list_for_each'
  - 'bip_for_each_vec'
  - 'bond_for_each_slave'
  - 'bond_for_each_slave_rcu'
113 114 115
  - 'bpf_for_each'
  - 'bpf_for_each_reg_in_vstate'
  - 'bpf_for_each_reg_in_vstate_mask'
116
  - 'bpf_for_each_spilled_reg'
117 118
  - 'bpf_object__for_each_map'
  - 'bpf_object__for_each_program'
119 120 121 122 123 124 125
  - 'btree_for_each_safe128'
  - 'btree_for_each_safe32'
  - 'btree_for_each_safe64'
  - 'btree_for_each_safel'
  - 'card_for_each_dev'
  - 'cgroup_taskset_for_each'
  - 'cgroup_taskset_for_each_leader'
126
  - 'cpu_aggr_map__for_each_idx'
127
  - 'cpufreq_for_each_efficient_entry_idx'
128 129 130 131 132 133 134
  - 'cpufreq_for_each_entry'
  - 'cpufreq_for_each_entry_idx'
  - 'cpufreq_for_each_valid_entry'
  - 'cpufreq_for_each_valid_entry_idx'
  - 'css_for_each_child'
  - 'css_for_each_descendant_post'
  - 'css_for_each_descendant_pre'
135
  - 'damon_for_each_region'
136
  - 'damon_for_each_region_from'
137 138 139 140 141
  - 'damon_for_each_region_safe'
  - 'damon_for_each_scheme'
  - 'damon_for_each_scheme_safe'
  - 'damon_for_each_target'
  - 'damon_for_each_target_safe'
142 143
  - 'damos_for_each_filter'
  - 'damos_for_each_filter_safe'
144 145 146
  - 'data__for_each_file'
  - 'data__for_each_file_new'
  - 'data__for_each_file_start'
147
  - 'device_for_each_child_node'
148
  - 'displayid_iter_for_each'
149
  - 'dma_fence_array_for_each'
150
  - 'dma_fence_chain_for_each'
151 152 153
  - 'dma_fence_unwrap_for_each'
  - 'dma_resv_for_each_fence'
  - 'dma_resv_for_each_fence_unlocked'
154
  - 'do_for_each_ftrace_op'
155 156 157
  - 'drm_atomic_crtc_for_each_plane'
  - 'drm_atomic_crtc_state_for_each_plane'
  - 'drm_atomic_crtc_state_for_each_plane_state'
158
  - 'drm_atomic_for_each_plane_damage'
159 160
  - 'drm_client_for_each_connector_iter'
  - 'drm_client_for_each_modeset'
161
  - 'drm_connector_for_each_possible_encoder'
162 163
  - 'drm_exec_for_each_locked_object'
  - 'drm_exec_for_each_locked_object_reverse'
164
  - 'drm_for_each_bridge_in_chain'
165 166
  - 'drm_for_each_connector_iter'
  - 'drm_for_each_crtc'
167
  - 'drm_for_each_crtc_reverse'
168 169 170 171 172 173
  - 'drm_for_each_encoder'
  - 'drm_for_each_encoder_mask'
  - 'drm_for_each_fb'
  - 'drm_for_each_legacy_plane'
  - 'drm_for_each_plane'
  - 'drm_for_each_plane_mask'
174
  - 'drm_for_each_privobj'
175 176 177 178 179 180 181 182 183
  - 'drm_gem_for_each_gpuva'
  - 'drm_gem_for_each_gpuva_safe'
  - 'drm_gpuva_for_each_op'
  - 'drm_gpuva_for_each_op_from_reverse'
  - 'drm_gpuva_for_each_op_safe'
  - 'drm_gpuvm_for_each_va'
  - 'drm_gpuvm_for_each_va_range'
  - 'drm_gpuvm_for_each_va_range_safe'
  - 'drm_gpuvm_for_each_va_safe'
184 185 186 187
  - 'drm_mm_for_each_hole'
  - 'drm_mm_for_each_node'
  - 'drm_mm_for_each_node_in_range'
  - 'drm_mm_for_each_node_safe'
188 189
  - 'dsa_switch_for_each_available_port'
  - 'dsa_switch_for_each_cpu_port'
190
  - 'dsa_switch_for_each_cpu_port_continue_reverse'
191 192 193 194
  - 'dsa_switch_for_each_port'
  - 'dsa_switch_for_each_port_continue_reverse'
  - 'dsa_switch_for_each_port_safe'
  - 'dsa_switch_for_each_user_port'
195
  - 'dsa_tree_for_each_cpu_port'
196
  - 'dsa_tree_for_each_user_port'
197
  - 'dsa_tree_for_each_user_port_continue_reverse'
198 199 200 201 202 203 204 205 206 207
  - 'dso__for_each_symbol'
  - 'dsos__for_each_with_build_id'
  - 'elf_hash_for_each_possible'
  - 'elf_symtab__for_each_symbol'
  - 'evlist__for_each_cpu'
  - 'evlist__for_each_entry'
  - 'evlist__for_each_entry_continue'
  - 'evlist__for_each_entry_from'
  - 'evlist__for_each_entry_reverse'
  - 'evlist__for_each_entry_safe'
208
  - 'flow_action_for_each'
209
  - 'for_each_acpi_consumer_dev'
210
  - 'for_each_acpi_dev_match'
211
  - 'for_each_active_dev_scope'
212 213
  - 'for_each_active_drhd_unit'
  - 'for_each_active_iommu'
214
  - 'for_each_active_route'
215
  - 'for_each_aggr_pgid'
216 217
  - 'for_each_and_bit'
  - 'for_each_andnot_bit'
218
  - 'for_each_available_child_of_node'
219
  - 'for_each_bench'
220 221
  - 'for_each_bio'
  - 'for_each_board_func_rsrc'
222 223
  - 'for_each_btf_ext_rec'
  - 'for_each_btf_ext_sec'
224
  - 'for_each_bvec'
225 226
  - 'for_each_card_auxs'
  - 'for_each_card_auxs_safe'
227
  - 'for_each_card_components'
228
  - 'for_each_card_dapms'
229
  - 'for_each_card_pre_auxs'
230 231 232
  - 'for_each_card_prelinks'
  - 'for_each_card_rtds'
  - 'for_each_card_rtds_safe'
233 234
  - 'for_each_card_widgets'
  - 'for_each_card_widgets_safe'
235
  - 'for_each_cgroup_storage_type'
236 237 238
  - 'for_each_child_of_node'
  - 'for_each_clear_bit'
  - 'for_each_clear_bit_from'
239 240
  - 'for_each_clear_bitrange'
  - 'for_each_clear_bitrange_from'
241
  - 'for_each_cmd'
242
  - 'for_each_cmsghdr'
243
  - 'for_each_collection'
244
  - 'for_each_comp_order'
245
  - 'for_each_compatible_node'
246 247
  - 'for_each_component_dais'
  - 'for_each_component_dais_safe'
248
  - 'for_each_conduit'
249
  - 'for_each_console'
250
  - 'for_each_console_srcu'
251 252
  - 'for_each_cpu'
  - 'for_each_cpu_and'
253 254
  - 'for_each_cpu_andnot'
  - 'for_each_cpu_or'
255
  - 'for_each_cpu_wrap'
256
  - 'for_each_dapm_widgets'
257
  - 'for_each_dedup_cand'
258
  - 'for_each_dev_addr'
259
  - 'for_each_dev_scope'
260
  - 'for_each_dma_cap_mask'
261 262 263 264
  - 'for_each_dpcm_be'
  - 'for_each_dpcm_be_rollback'
  - 'for_each_dpcm_be_safe'
  - 'for_each_dpcm_fe'
265 266 267 268
  - 'for_each_drhd_unit'
  - 'for_each_dss_dev'
  - 'for_each_efi_memory_desc'
  - 'for_each_efi_memory_desc_in_map'
269 270 271
  - 'for_each_element'
  - 'for_each_element_extid'
  - 'for_each_element_id'
272
  - 'for_each_endpoint_of_node'
273 274
  - 'for_each_event'
  - 'for_each_event_tps'
275 276 277
  - 'for_each_evictable_lru'
  - 'for_each_fib6_node_rt_rcu'
  - 'for_each_fib6_walker_rt'
278 279
  - 'for_each_free_mem_pfn_range_in_zone'
  - 'for_each_free_mem_pfn_range_in_zone_from'
280 281 282
  - 'for_each_free_mem_range'
  - 'for_each_free_mem_range_reverse'
  - 'for_each_func_rsrc'
283
  - 'for_each_gpiochip_node'
284
  - 'for_each_group_evsel'
285
  - 'for_each_group_evsel_head'
286
  - 'for_each_group_member'
287
  - 'for_each_group_member_head'
288 289
  - 'for_each_hstate'
  - 'for_each_if'
290 291 292 293
  - 'for_each_inject_fn'
  - 'for_each_insn'
  - 'for_each_insn_prefix'
  - 'for_each_intid'
294 295 296
  - 'for_each_iommu'
  - 'for_each_ip_tunnel_rcu'
  - 'for_each_irq_nr'
297
  - 'for_each_lang'
298
  - 'for_each_link_codecs'
299
  - 'for_each_link_cpus'
300
  - 'for_each_link_platforms'
301 302 303
  - 'for_each_lru'
  - 'for_each_matching_node'
  - 'for_each_matching_node_and_match'
304
  - 'for_each_media_entity_data_link'
305 306 307
  - 'for_each_mem_pfn_range'
  - 'for_each_mem_range'
  - 'for_each_mem_range_rev'
308
  - 'for_each_mem_region'
309
  - 'for_each_member'
310
  - 'for_each_memory'
311
  - 'for_each_migratetype_order'
312
  - 'for_each_missing_reg'
313 314
  - 'for_each_mle_subelement'
  - 'for_each_mod_mem_type'
315
  - 'for_each_net'
316
  - 'for_each_net_continue_reverse'
317
  - 'for_each_net_rcu'
318 319 320
  - 'for_each_netdev'
  - 'for_each_netdev_continue'
  - 'for_each_netdev_continue_rcu'
321
  - 'for_each_netdev_continue_reverse'
322
  - 'for_each_netdev_dump'
323 324 325 326 327 328 329
  - 'for_each_netdev_feature'
  - 'for_each_netdev_in_bond_rcu'
  - 'for_each_netdev_rcu'
  - 'for_each_netdev_reverse'
  - 'for_each_netdev_safe'
  - 'for_each_new_connector_in_state'
  - 'for_each_new_crtc_in_state'
330
  - 'for_each_new_mst_mgr_in_state'
331
  - 'for_each_new_plane_in_state'
332
  - 'for_each_new_plane_in_state_reverse'
333
  - 'for_each_new_private_obj_in_state'
334
  - 'for_each_new_reg'
335 336 337 338 339 340 341
  - 'for_each_node'
  - 'for_each_node_by_name'
  - 'for_each_node_by_type'
  - 'for_each_node_mask'
  - 'for_each_node_state'
  - 'for_each_node_with_cpus'
  - 'for_each_node_with_property'
342
  - 'for_each_nonreserved_multicast_dest_pgid'
343
  - 'for_each_numa_hop_mask'
344 345
  - 'for_each_of_allnodes'
  - 'for_each_of_allnodes_from'
346
  - 'for_each_of_cpu_node'
347 348 349
  - 'for_each_of_pci_range'
  - 'for_each_old_connector_in_state'
  - 'for_each_old_crtc_in_state'
350
  - 'for_each_old_mst_mgr_in_state'
351 352
  - 'for_each_old_plane_in_state'
  - 'for_each_old_private_obj_in_state'
353 354
  - 'for_each_oldnew_connector_in_state'
  - 'for_each_oldnew_crtc_in_state'
355
  - 'for_each_oldnew_mst_mgr_in_state'
356
  - 'for_each_oldnew_plane_in_state'
357
  - 'for_each_oldnew_plane_in_state_reverse'
358 359 360 361
  - 'for_each_oldnew_private_obj_in_state'
  - 'for_each_online_cpu'
  - 'for_each_online_node'
  - 'for_each_online_pgdat'
362
  - 'for_each_or_bit'
363
  - 'for_each_path'
364 365
  - 'for_each_pci_bridge'
  - 'for_each_pci_dev'
366
  - 'for_each_pcm_streams'
367
  - 'for_each_physmem_range'
368 369
  - 'for_each_populated_zone'
  - 'for_each_possible_cpu'
370
  - 'for_each_present_blessed_reg'
371 372 373
  - 'for_each_present_cpu'
  - 'for_each_prime_number'
  - 'for_each_prime_number_from'
374
  - 'for_each_probe_cache_entry'
375 376
  - 'for_each_process'
  - 'for_each_process_thread'
377 378 379 380 381 382
  - 'for_each_prop_codec_conf'
  - 'for_each_prop_dai_codec'
  - 'for_each_prop_dai_cpu'
  - 'for_each_prop_dlc_codecs'
  - 'for_each_prop_dlc_cpus'
  - 'for_each_prop_dlc_platforms'
383
  - 'for_each_property_of_node'
384 385
  - 'for_each_reg'
  - 'for_each_reg_filtered'
386 387
  - 'for_each_reloc'
  - 'for_each_reloc_from'
388 389
  - 'for_each_requested_gpio'
  - 'for_each_requested_gpio_in_range'
390
  - 'for_each_reserved_mem_range'
391
  - 'for_each_reserved_mem_region'
392
  - 'for_each_rtd_codec_dais'
393
  - 'for_each_rtd_components'
394 395
  - 'for_each_rtd_cpu_dais'
  - 'for_each_rtd_dais'
396
  - 'for_each_sband_iftype_data'
397 398
  - 'for_each_script'
  - 'for_each_sec'
399 400
  - 'for_each_set_bit'
  - 'for_each_set_bit_from'
401
  - 'for_each_set_bit_wrap'
402 403
  - 'for_each_set_bitrange'
  - 'for_each_set_bitrange_from'
404
  - 'for_each_set_clump8'
405
  - 'for_each_sg'
406
  - 'for_each_sg_dma_page'
407
  - 'for_each_sg_page'
408 409 410 411
  - 'for_each_sgtable_dma_page'
  - 'for_each_sgtable_dma_sg'
  - 'for_each_sgtable_page'
  - 'for_each_sgtable_sg'
412
  - 'for_each_sibling_event'
413
  - 'for_each_sta_active_link'
414 415 416
  - 'for_each_subelement'
  - 'for_each_subelement_extid'
  - 'for_each_subelement_id'
417 418 419 420
  - 'for_each_sublist'
  - 'for_each_subsystem'
  - 'for_each_supported_activate_fn'
  - 'for_each_supported_inject_fn'
421
  - 'for_each_sym'
422
  - 'for_each_test'
423
  - 'for_each_thread'
424
  - 'for_each_token'
425
  - 'for_each_unicast_dest_pgid'
426 427 428 429
  - 'for_each_valid_link'
  - 'for_each_vif_active_link'
  - 'for_each_vma'
  - 'for_each_vma_range'
430
  - 'for_each_vsi'
431
  - 'for_each_wakeup_source'
432 433 434
  - 'for_each_zone'
  - 'for_each_zone_zonelist'
  - 'for_each_zone_zonelist_nodemask'
435
  - 'func_for_each_insn'
436 437
  - 'fwnode_for_each_available_child_node'
  - 'fwnode_for_each_child_node'
438
  - 'fwnode_for_each_parent_node'
439 440
  - 'fwnode_graph_for_each_endpoint'
  - 'gadget_for_each_ep'
441 442
  - 'genradix_for_each'
  - 'genradix_for_each_from'
443
  - 'genradix_for_each_reverse'
444 445 446 447 448 449 450
  - 'hash_for_each'
  - 'hash_for_each_possible'
  - 'hash_for_each_possible_rcu'
  - 'hash_for_each_possible_rcu_notrace'
  - 'hash_for_each_possible_safe'
  - 'hash_for_each_rcu'
  - 'hash_for_each_safe'
451 452 453 454
  - 'hashmap__for_each_entry'
  - 'hashmap__for_each_entry_safe'
  - 'hashmap__for_each_key_entry'
  - 'hashmap__for_each_key_entry_safe'
455
  - 'hctx_for_each_ctx'
456 457
  - 'hists__for_each_format'
  - 'hists__for_each_sort_list'
458 459 460 461 462 463 464 465 466 467 468 469 470 471
  - 'hlist_bl_for_each_entry'
  - 'hlist_bl_for_each_entry_rcu'
  - 'hlist_bl_for_each_entry_safe'
  - 'hlist_for_each'
  - 'hlist_for_each_entry'
  - 'hlist_for_each_entry_continue'
  - 'hlist_for_each_entry_continue_rcu'
  - 'hlist_for_each_entry_continue_rcu_bh'
  - 'hlist_for_each_entry_from'
  - 'hlist_for_each_entry_from_rcu'
  - 'hlist_for_each_entry_rcu'
  - 'hlist_for_each_entry_rcu_bh'
  - 'hlist_for_each_entry_rcu_notrace'
  - 'hlist_for_each_entry_safe'
472
  - 'hlist_for_each_entry_srcu'
473 474 475 476 477
  - 'hlist_for_each_safe'
  - 'hlist_nulls_for_each_entry'
  - 'hlist_nulls_for_each_entry_from'
  - 'hlist_nulls_for_each_entry_rcu'
  - 'hlist_nulls_for_each_entry_safe'
478 479
  - 'i3c_bus_for_each_i2cdev'
  - 'i3c_bus_for_each_i3cdev'
480 481
  - 'idr_for_each_entry'
  - 'idr_for_each_entry_continue'
482
  - 'idr_for_each_entry_continue_ul'
483
  - 'idr_for_each_entry_ul'
484 485
  - 'in_dev_for_each_ifa_rcu'
  - 'in_dev_for_each_ifa_rtnl'
486
  - 'inet_bind_bucket_for_each'
487
  - 'interval_tree_for_each_span'
488 489 490
  - 'intlist__for_each_entry'
  - 'intlist__for_each_entry_safe'
  - 'kcore_copy__for_each_phdr'
491 492 493
  - 'key_for_each'
  - 'key_for_each_safe'
  - 'klp_for_each_func'
494 495
  - 'klp_for_each_func_safe'
  - 'klp_for_each_func_static'
496
  - 'klp_for_each_object'
497 498
  - 'klp_for_each_object_safe'
  - 'klp_for_each_object_static'
499
  - 'kunit_suite_for_each_test_case'
500
  - 'kvm_for_each_memslot'
501
  - 'kvm_for_each_memslot_in_gfn_range'
502
  - 'kvm_for_each_vcpu'
503
  - 'libbpf_nla_for_each_attr'
504
  - 'list_for_each'
505 506
  - 'list_for_each_codec'
  - 'list_for_each_codec_safe'
507
  - 'list_for_each_continue'
508 509 510 511 512
  - 'list_for_each_entry'
  - 'list_for_each_entry_continue'
  - 'list_for_each_entry_continue_rcu'
  - 'list_for_each_entry_continue_reverse'
  - 'list_for_each_entry_from'
513
  - 'list_for_each_entry_from_rcu'
514 515 516 517 518 519 520 521
  - 'list_for_each_entry_from_reverse'
  - 'list_for_each_entry_lockless'
  - 'list_for_each_entry_rcu'
  - 'list_for_each_entry_reverse'
  - 'list_for_each_entry_safe'
  - 'list_for_each_entry_safe_continue'
  - 'list_for_each_entry_safe_from'
  - 'list_for_each_entry_safe_reverse'
522
  - 'list_for_each_entry_srcu'
523
  - 'list_for_each_from'
524 525
  - 'list_for_each_prev'
  - 'list_for_each_prev_safe'
526 527
  - 'list_for_each_rcu'
  - 'list_for_each_reverse'
528 529 530 531 532
  - 'list_for_each_safe'
  - 'llist_for_each'
  - 'llist_for_each_entry'
  - 'llist_for_each_entry_safe'
  - 'llist_for_each_safe'
533
  - 'lwq_for_each_safe'
534 535 536 537
  - 'map__for_each_symbol'
  - 'map__for_each_symbol_by_name'
  - 'maps__for_each_entry'
  - 'maps__for_each_entry_safe'
538
  - 'mas_for_each'
539
  - 'mci_for_each_dimm'
540 541 542 543
  - 'media_device_for_each_entity'
  - 'media_device_for_each_intf'
  - 'media_device_for_each_link'
  - 'media_device_for_each_pad'
544 545 546 547 548
  - 'media_entity_for_each_pad'
  - 'media_pipeline_for_each_entity'
  - 'media_pipeline_for_each_pad'
  - 'mlx5_lag_for_each_peer_mdev'
  - 'msi_domain_for_each_desc'
549
  - 'msi_for_each_desc'
550
  - 'mt_for_each'
551
  - 'nanddev_io_for_each_page'
552 553 554 555
  - 'netdev_for_each_lower_dev'
  - 'netdev_for_each_lower_private'
  - 'netdev_for_each_lower_private_rcu'
  - 'netdev_for_each_mc_addr'
556 557
  - 'netdev_for_each_synced_mc_addr'
  - 'netdev_for_each_synced_uc_addr'
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573
  - 'netdev_for_each_uc_addr'
  - 'netdev_for_each_upper_dev_rcu'
  - 'netdev_hw_addr_list_for_each'
  - 'nft_rule_for_each_expr'
  - 'nla_for_each_attr'
  - 'nla_for_each_nested'
  - 'nlmsg_for_each_attr'
  - 'nlmsg_for_each_msg'
  - 'nr_neigh_for_each'
  - 'nr_neigh_for_each_safe'
  - 'nr_node_for_each'
  - 'nr_node_for_each_safe'
  - 'of_for_each_phandle'
  - 'of_property_for_each_string'
  - 'of_property_for_each_u32'
  - 'pci_bus_for_each_resource'
574
  - 'pci_dev_for_each_resource'
575 576
  - 'pcl_for_each_chunk'
  - 'pcl_for_each_segment'
577
  - 'pcm_for_each_format'
578 579 580 581
  - 'perf_config_items__for_each_entry'
  - 'perf_config_sections__for_each_entry'
  - 'perf_config_set__for_each_entry'
  - 'perf_cpu_map__for_each_cpu'
582
  - 'perf_cpu_map__for_each_idx'
583 584 585 586 587 588 589 590 591
  - 'perf_evlist__for_each_entry'
  - 'perf_evlist__for_each_entry_reverse'
  - 'perf_evlist__for_each_entry_safe'
  - 'perf_evlist__for_each_evsel'
  - 'perf_evlist__for_each_mmap'
  - 'perf_hpp_list__for_each_format'
  - 'perf_hpp_list__for_each_format_safe'
  - 'perf_hpp_list__for_each_sort_list'
  - 'perf_hpp_list__for_each_sort_list_safe'
592
  - 'perf_tool_event__for_each_event'
593 594 595 596 597 598 599 600 601 602 603 604 605
  - 'plist_for_each'
  - 'plist_for_each_continue'
  - 'plist_for_each_entry'
  - 'plist_for_each_entry_continue'
  - 'plist_for_each_entry_safe'
  - 'plist_for_each_safe'
  - 'pnp_for_each_card'
  - 'pnp_for_each_dev'
  - 'protocol_for_each_card'
  - 'protocol_for_each_dev'
  - 'queue_for_each_hw_ctx'
  - 'radix_tree_for_each_slot'
  - 'radix_tree_for_each_tagged'
606
  - 'rb_for_each'
607
  - 'rbtree_postorder_for_each_entry_safe'
608
  - 'rdma_for_each_block'
609
  - 'rdma_for_each_port'
610
  - 'rdma_umem_for_each_dma_block'
611
  - 'resort_rb__for_each_entry'
612 613 614 615 616 617
  - 'resource_list_for_each_entry'
  - 'resource_list_for_each_entry_safe'
  - 'rhl_for_each_entry_rcu'
  - 'rhl_for_each_rcu'
  - 'rht_for_each'
  - 'rht_for_each_entry'
618
  - 'rht_for_each_entry_from'
619
  - 'rht_for_each_entry_rcu'
620
  - 'rht_for_each_entry_rcu_from'
621
  - 'rht_for_each_entry_safe'
622
  - 'rht_for_each_from'
623
  - 'rht_for_each_rcu'
624
  - 'rht_for_each_rcu_from'
625
  - 'rq_for_each_bvec'
626
  - 'rq_for_each_segment'
627 628
  - 'rq_list_for_each'
  - 'rq_list_for_each_safe'
629
  - 'sample_read_group__for_each'
630 631 632 633
  - 'scsi_for_each_prot_sg'
  - 'scsi_for_each_sg'
  - 'sctp_for_each_hentry'
  - 'sctp_skb_for_each'
634 635 636
  - 'sec_for_each_insn'
  - 'sec_for_each_insn_continue'
  - 'sec_for_each_insn_from'
637
  - 'sec_for_each_sym'
638 639 640 641
  - 'shdma_for_each_chan'
  - 'shost_for_each_device'
  - 'sk_for_each'
  - 'sk_for_each_bound'
642
  - 'sk_for_each_bound_bhash2'
643 644 645 646 647 648 649
  - 'sk_for_each_entry_offset_rcu'
  - 'sk_for_each_from'
  - 'sk_for_each_rcu'
  - 'sk_for_each_safe'
  - 'sk_nulls_for_each'
  - 'sk_nulls_for_each_from'
  - 'sk_nulls_for_each_rcu'
650
  - 'snd_array_for_each'
651 652 653 654 655
  - 'snd_pcm_group_for_each_entry'
  - 'snd_soc_dapm_widget_for_each_path'
  - 'snd_soc_dapm_widget_for_each_path_safe'
  - 'snd_soc_dapm_widget_for_each_sink_path'
  - 'snd_soc_dapm_widget_for_each_source_path'
656 657 658 659 660
  - 'strlist__for_each_entry'
  - 'strlist__for_each_entry_safe'
  - 'sym_for_each_insn'
  - 'sym_for_each_insn_continue_reverse'
  - 'symbols__for_each_entry'
661
  - 'tb_property_for_each'
662
  - 'tcf_act_for_each_action'
663
  - 'tcf_exts_for_each_action'
664 665
  - 'ttm_resource_manager_for_each_res'
  - 'twsk_for_each_bound_bhash2'
666 667 668 669 670 671 672 673
  - 'udp_portaddr_for_each_entry'
  - 'udp_portaddr_for_each_entry_rcu'
  - 'usb_hub_for_each_child'
  - 'v4l2_device_for_each_subdev'
  - 'v4l2_m2m_for_each_dst_buf'
  - 'v4l2_m2m_for_each_dst_buf_safe'
  - 'v4l2_m2m_for_each_src_buf'
  - 'v4l2_m2m_for_each_src_buf_safe'
674
  - 'virtio_device_for_each_vq'
675
  - 'while_for_each_ftrace_op'
676
  - 'xa_for_each'
677
  - 'xa_for_each_marked'
678
  - 'xa_for_each_range'
679
  - 'xa_for_each_start'
680 681 682
  - 'xas_for_each'
  - 'xas_for_each_conflict'
  - 'xas_for_each_marked'
683 684 685 686 687
  - 'xbc_array_for_each_value'
  - 'xbc_for_each_key_value'
  - 'xbc_node_for_each_array_value'
  - 'xbc_node_for_each_child'
  - 'xbc_node_for_each_key_value'
688
  - 'xbc_node_for_each_subkey'
689 690
  - 'zorro_for_each_dev'

691
IncludeBlocks: Preserve
692 693 694 695 696
IncludeCategories:
  - Regex: '.*'
    Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
697
IndentGotoLabels: false
698
IndentPPDirectives: None
699
IndentWidth: 8
700
IndentWrappedFunctionNames: false
701 702 703 704 705 706
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
707
NamespaceIndentation: None
708
ObjCBinPackProtocolList: Auto
709 710 711 712 713
ObjCBlockIndentWidth: 8
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true

# Taken from git's rules
714
PenaltyBreakAssignment: 10
715 716 717 718 719 720 721 722 723 724
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60

PointerAlignment: Right
ReflowComments: false
SortIncludes: false
725
SortUsingDeclarations: false
726 727 728
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
729 730
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
731
SpaceBeforeParens: ControlStatementsExceptForEachMacros
732
SpaceBeforeRangeBasedForLoopColon: true
733 734 735 736 737 738 739 740 741 742 743
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 8
UseTab: Always
...