Skip to content

Commit 0a3f00a

Browse files
ulfalizergalak
authored andcommitted
scripts/dts: Rename get_node_label() to node_label()
Just returns a value, with no side effects. Signed-off-by: Ulf Magnusson <[email protected]>
1 parent 82adc27 commit 0a3f00a

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

scripts/dts/extract/clocks.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def _extract_consumer(self, node_path, clocks, def_label):
2323

2424
clock_consumer = reduced[node_path]
2525
clock_consumer_bindings = get_binding(node_path)
26-
clock_consumer_label = 'DT_' + get_node_label(node_path)
26+
clock_consumer_label = 'DT_' + node_label(node_path)
2727

2828
clock_index = 0
2929
clock_cell_index = 0
@@ -43,8 +43,7 @@ def _extract_consumer(self, node_path, clocks, def_label):
4343
clock_provider = reduced[clock_provider_node_path]
4444
clock_provider_bindings = get_binding(
4545
clock_provider_node_path)
46-
clock_provider_label = get_node_label( \
47-
clock_provider_node_path)
46+
clock_provider_label = node_label(clock_provider_node_path)
4847
nr_clock_cells = int(clock_provider['props'].get(
4948
'#clock-cells', 0))
5049
clock_cells_string = clock_provider_bindings.get(

scripts/dts/extract/globals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def create_reduced(node, path):
167167
create_reduced(child_node, path + child_name)
168168

169169

170-
def get_node_label(node_path):
170+
def node_label(node_path):
171171
node_compat = get_compat(node_path)
172172
def_label = str_to_label(node_compat)
173173
if '@' in node_path:

scripts/dts/extract_dts_includes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ def generate_prop_defines(node_path, prop):
6666
# If the binding specifies a parent for the node, then include the
6767
# parent in the #define's generated for the properties
6868
parent_path = get_parent_path(node_path)
69-
def_label = 'DT_' + get_node_label(parent_path) + '_' \
70-
+ get_node_label(node_path)
69+
def_label = 'DT_' + node_label(parent_path) + '_' \
70+
+ node_label(node_path)
7171
else:
72-
def_label = 'DT_' + get_node_label(node_path)
72+
def_label = 'DT_' + node_label(node_path)
7373

7474
names = prop_names(reduced[node_path], prop)
7575

@@ -174,7 +174,7 @@ def generate_bus_defines(node_path):
174174
# Generate *_BUS_NAME #define
175175
extract_bus_name(
176176
node_path,
177-
'DT_' + get_node_label(parent_path) + '_' + get_node_label(node_path))
177+
'DT_' + node_label(parent_path) + '_' + node_label(node_path))
178178

179179

180180
def prop_names(node, prop_name):

0 commit comments

Comments
 (0)