Skip to content

Commit 42b2e94

Browse files
frowandrobherring
authored andcommitted
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>
1 parent 0290c4c commit 42b2e94

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

‎drivers/of/overlay.c‎

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,29 @@ static int overlay_notify(struct overlay_changeset *ovcs,
9090
return 0;
9191
}
9292

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+
*/
93105
static struct property *dup_and_fixup_symbol_prop(
94106
struct overlay_changeset *ovcs, const struct property *prop)
95107
{
96108
struct fragment *fragment;
97109
struct property *new;
98110
const char *overlay_name;
99-
char *label_path;
111+
char *symbol_path_tail;
100112
char *symbol_path;
101113
const char *target_path;
102114
int k;
103-
int label_path_len;
115+
int symbol_path_tail_len;
104116
int overlay_name_len;
105117
int target_path_len;
106118

@@ -126,18 +138,18 @@ static struct property *dup_and_fixup_symbol_prop(
126138
target_path = fragment->target->full_name;
127139
target_path_len = strlen(target_path);
128140

129-
label_path = symbol_path + overlay_name_len;
130-
label_path_len = strlen(label_path);
141+
symbol_path_tail = symbol_path + overlay_name_len;
142+
symbol_path_tail_len = strlen(symbol_path_tail);
131143

132144
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;
134146
new->value = kzalloc(new->length, GFP_KERNEL);
135147

136148
if (!new->name || !new->value)
137149
goto err_free;
138150

139151
strcpy(new->value, target_path);
140-
strcpy(new->value + target_path_len, label_path);
152+
strcpy(new->value + target_path_len, symbol_path_tail);
141153

142154
of_property_set_flag(new, OF_DYNAMIC);
143155

0 commit comments

Comments
 (0)