[PATCH v2 1/1] .clang-format: add U-Boot specific for each macros
Simon Glass
sjg at chromium.org
Wed Apr 29 16:21:26 CEST 2026
Hi Heinrich,
On 2026-04-28T14:28:48, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
> .clang-format: add U-Boot specific for each macros
>
> Formatting via clang-format is controlled by .clang-format.
> For each statements should be formatted with a brace at the line end:
>
> for_each() {
> }
>
> This requires clang-format to know that the symbol is not a function
> but a for each macro. We use some for each macros which don't exist in
> Linux. Add these to file .clang-format.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
>
> .clang-format | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
> diff --git a/.clang-format b/.clang-format
> @@ -748,6 +748,57 @@ ForEachMacros:
> + # U-Boot specific
> + - '__for_each_child_of_node'
Should the 'git grep' recipe include drivers/ and arch/ as well?
Regards,
Simon
More information about the U-Boot
mailing list