summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2021-06-02 10:18:58 +0200
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-06-10 19:38:25 +0200
commitca24306d83a125df187ad53eddb038fe0cffb8ca (patch)
treeded15cb9027a6d138d2cb83ffa26535504c81ef8 /include
parentDocumentation: tracing: Add per-group/all events enablement desciption (diff)
downloadlinux-ca24306d83a125df187ad53eddb038fe0cffb8ca.tar.xz
linux-ca24306d83a125df187ad53eddb038fe0cffb8ca.zip
bootconfig: Change array value to use child node
It is not possible to put an array value with subkeys under a key node, because both of subkeys and the array elements are using "next" field of the xbc_node. Thus this changes the array values to use "child" field in the array case. The reason why split this change is to test it easily. Link: https://lkml.kernel.org/r/162262193838.264090.16044473274501498656.stgit@devnote2 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/bootconfig.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h
index 2696eb0fc149..3178a31fdabc 100644
--- a/include/linux/bootconfig.h
+++ b/include/linux/bootconfig.h
@@ -71,7 +71,7 @@ static inline __init bool xbc_node_is_key(struct xbc_node *node)
*/
static inline __init bool xbc_node_is_array(struct xbc_node *node)
{
- return xbc_node_is_value(node) && node->next != 0;
+ return xbc_node_is_value(node) && node->child != 0;
}
/**
@@ -140,7 +140,7 @@ static inline struct xbc_node * __init xbc_find_node(const char *key)
*/
#define xbc_array_for_each_value(anode, value) \
for (value = xbc_node_get_data(anode); anode != NULL ; \
- anode = xbc_node_get_next(anode), \
+ anode = xbc_node_get_child(anode), \
value = anode ? xbc_node_get_data(anode) : NULL)
/**
@@ -171,7 +171,7 @@ static inline struct xbc_node * __init xbc_find_node(const char *key)
*/
#define xbc_node_for_each_array_value(node, key, anode, value) \
for (value = xbc_node_find_value(node, key, &anode); value != NULL; \
- anode = xbc_node_get_next(anode), \
+ anode = xbc_node_get_child(anode), \
value = anode ? xbc_node_get_data(anode) : NULL)
/**