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

Signed-off-by: Josh Law <[email protected]>
---
 lib/bootconfig.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/lib/bootconfig.c b/lib/bootconfig.c
index b0ef1e74e98a..d77b6533ac00 100644
--- a/lib/bootconfig.c
+++ b/lib/bootconfig.c
@@ -79,6 +79,7 @@ static inline void xbc_free_mem(void *addr, size_t size, bool 
early)
        free(addr);
 }
 #endif
+
 /**
  * xbc_get_info() - Get the information of loaded boot config
  * @node_size: A pointer to store the number of nodes.
@@ -112,7 +113,7 @@ static int __init xbc_parse_error(const char *msg, const 
char *p)
  * xbc_root_node() - Get the root node of extended boot config
  *
  * Return the address of root node of extended boot config. If the
- * extended boot config is not initiized, return NULL.
+ * extended boot config is not initialized, return NULL.
  */
 struct xbc_node * __init xbc_root_node(void)
 {
@@ -364,7 +365,7 @@ struct xbc_node * __init xbc_node_find_next_leaf(struct 
xbc_node *root,
                        node = xbc_node_get_parent(node);
                        if (node == root)
                                return NULL;
-                       /* User passed a node which is not uder parent */
+                       /* User passed a node which is not under parent */
                        if (WARN_ON(!node))
                                return NULL;
                }
@@ -472,8 +473,9 @@ static struct xbc_node * __init __xbc_add_sibling(char 
*data, uint32_t flag, boo
                                sib->next = xbc_node_index(node);
                        }
                }
-       } else
+       } else {
                xbc_parse_error("Too many nodes", data);
+       }
 
        return node;
 }
@@ -655,9 +657,9 @@ static int __init __xbc_add_key(char *k)
        if (unlikely(xbc_node_num == 0))
                goto add_node;
 
-       if (!last_parent)       /* the first level */
+       if (!last_parent) {     /* the first level */
                node = find_match_node(xbc_nodes, k);
-       else {
+       } else {
                child = xbc_node_get_child(last_parent);
                /* Since the value node is the first child, skip it. */
                if (child && xbc_node_is_value(child))
@@ -665,9 +667,9 @@ static int __init __xbc_add_key(char *k)
                node = find_match_node(child, k);
        }
 
-       if (node)
+       if (node) {
                last_parent = node;
-       else {
+       } else {
 add_node:
                node = xbc_add_child(k, XBC_KEY);
                if (!node)
@@ -991,8 +993,9 @@ int __init xbc_init(const char *data, size_t size, const 
char **emsg, int *epos)
                if (emsg)
                        *emsg = xbc_err_msg;
                _xbc_exit(true);
-       } else
+       } else {
                ret = xbc_node_num;
+       }
 
        return ret;
 }
-- 
2.34.1


Reply via email to