On Tue, 17 Mar 2026 12:03:40 +0100
Markus Elfring <[email protected]> wrote:
> …
> > +++ b/lib/bootconfig.c
> > @@ -823,6 +823,10 @@ static int __init xbc_verify_tree(void)
> > return xbc_parse_error("No closing brace",
> > xbc_node_get_data(xbc_nodes + i));
> > }
> > + if (xbc_nodes[i].child >= xbc_node_num) {
> > + return xbc_parse_error("Broken child node",
> > + xbc_node_get_data(xbc_nodes + i));
> > + }
> > }
> …
>
> How do you think about to omit curly brackets for this if branch?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v7.0-rc4#n197
>
Markus, please stop. If you don't understand the rules, do not suggest them.
The brackets *are* appropriate. The rule of omitting the brackets is for
*single line* statements. The above return statement is long and there's a
line break, which means, curly brackets *are* required for visibility reasons.
-- Steve