aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Rowand <frank.rowand@sony.com>2017-10-17 19:36:24 -0400
committerRob Herring <robh@kernel.org>2017-10-17 21:46:55 -0400
commit42b2e94fe83c354b4373992c8ea28ef0ace2e633 (patch)
tree3a07724552b23b6e05429029b2ef5cb9dcc51967
parent0290c4ca2536a35e55c53cfb9058465b1f987b17 (diff)
of: overlay: rename identifiers in dup_and_fixup_symbol_prop()
More renaming of identifiers to better reflect what they do. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r--drivers/of/overlay.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index 69610637af88..bb8867cae05b 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -90,17 +90,29 @@ static int overlay_notify(struct overlay_changeset *ovcs,
90 return 0; 90 return 0;
91} 91}
92 92
93/*
94 * The properties in the "/__symbols__" node are "symbols".
95 *
96 * The value of properties in the "/__symbols__" node is the path of a
97 * node in the subtree of a fragment node's "__overlay__" node, for
98 * example "/fragment@0/__overlay__/symbol_path_tail". Symbol_path_tail
99 * can be a single node or it may be a multi-node path.
100 *
101 * The duplicated property value will be modified by replacing the
102 * "/fragment_name/__overlay/" portion of the value with the target
103 * path from the fragment node.
104 */
93static struct property *dup_and_fixup_symbol_prop( 105static struct property *dup_and_fixup_symbol_prop(
94 struct overlay_changeset *ovcs, const struct property *prop) 106 struct overlay_changeset *ovcs, const struct property *prop)
95{ 107{
96 struct fragment *fragment; 108 struct fragment *fragment;
97 struct property *new; 109 struct property *new;
98 const char *overlay_name; 110 const char *overlay_name;
99 char *label_path; 111 char *symbol_path_tail;
100 char *symbol_path; 112 char *symbol_path;
101 const char *target_path; 113 const char *target_path;
102 int k; 114 int k;
103 int label_path_len; 115 int symbol_path_tail_len;
104 int overlay_name_len; 116 int overlay_name_len;
105 int target_path_len; 117 int target_path_len;
106 118
@@ -126,18 +138,18 @@ static struct property *dup_and_fixup_symbol_prop(
126 target_path = fragment->target->full_name; 138 target_path = fragment->target->full_name;
127 target_path_len = strlen(target_path); 139 target_path_len = strlen(target_path);
128 140
129 label_path = symbol_path + overlay_name_len; 141 symbol_path_tail = symbol_path + overlay_name_len;
130 label_path_len = strlen(label_path); 142 symbol_path_tail_len = strlen(symbol_path_tail);
131 143
132 new->name = kstrdup(prop->name, GFP_KERNEL); 144 new->name = kstrdup(prop->name, GFP_KERNEL);
133 new->length = target_path_len + label_path_len + 1; 145 new->length = target_path_len + symbol_path_tail_len + 1;
134 new->value = kzalloc(new->length, GFP_KERNEL); 146 new->value = kzalloc(new->length, GFP_KERNEL);
135 147
136 if (!new->name || !new->value) 148 if (!new->name || !new->value)
137 goto err_free; 149 goto err_free;
138 150
139 strcpy(new->value, target_path); 151 strcpy(new->value, target_path);
140 strcpy(new->value + target_path_len, label_path); 152 strcpy(new->value + target_path_len, symbol_path_tail);
141 153
142 of_property_set_flag(new, OF_DYNAMIC); 154 of_property_set_flag(new, OF_DYNAMIC);
143 155