Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/bootconfig: clean up comment typos and bracing

Fixes kerneldoc typos ("initiized" and "uder") and adds a missing blank line.
Also fixes inconsistent if/else bracing in __xbc_add_key() and elsewhere.

Link: https://lore.kernel.org/all/20260318155919.78168-2-objecting@objecting.org/

Signed-off-by: Josh Law <objecting@objecting.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

authored by

Josh Law and committed by
Masami Hiramatsu (Google)
7eaf074e 3b2c2ab4

+11 -8
+11 -8
lib/bootconfig.c
··· 79 79 free(addr); 80 80 } 81 81 #endif 82 + 82 83 /** 83 84 * xbc_get_info() - Get the information of loaded boot config 84 85 * @node_size: A pointer to store the number of nodes. ··· 113 112 * xbc_root_node() - Get the root node of extended boot config 114 113 * 115 114 * Return the address of root node of extended boot config. If the 116 - * extended boot config is not initiized, return NULL. 115 + * extended boot config is not initialized, return NULL. 117 116 */ 118 117 struct xbc_node * __init xbc_root_node(void) 119 118 { ··· 365 364 node = xbc_node_get_parent(node); 366 365 if (node == root) 367 366 return NULL; 368 - /* User passed a node which is not uder parent */ 367 + /* User passed a node which is not under parent */ 369 368 if (WARN_ON(!node)) 370 369 return NULL; 371 370 } ··· 473 472 sib->next = xbc_node_index(node); 474 473 } 475 474 } 476 - } else 475 + } else { 477 476 xbc_parse_error("Too many nodes", data); 477 + } 478 478 479 479 return node; 480 480 } ··· 657 655 if (unlikely(xbc_node_num == 0)) 658 656 goto add_node; 659 657 660 - if (!last_parent) /* the first level */ 658 + if (!last_parent) { /* the first level */ 661 659 node = find_match_node(xbc_nodes, k); 662 - else { 660 + } else { 663 661 child = xbc_node_get_child(last_parent); 664 662 /* Since the value node is the first child, skip it. */ 665 663 if (child && xbc_node_is_value(child)) ··· 667 665 node = find_match_node(child, k); 668 666 } 669 667 670 - if (node) 668 + if (node) { 671 669 last_parent = node; 672 - else { 670 + } else { 673 671 add_node: 674 672 node = xbc_add_child(k, XBC_KEY); 675 673 if (!node) ··· 994 992 if (emsg) 995 993 *emsg = xbc_err_msg; 996 994 _xbc_exit(true); 997 - } else 995 + } else { 998 996 ret = xbc_node_num; 997 + } 999 998 1000 999 return ret; 1001 1000 }