Skip to content

Commit 2def475

Browse files
committed
scripts: Removing init function pointer from check_init_priorities.py
As the pointer has been removed from struct init_entry, there is no point to look for it nor to display any information about it (obviously). Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent b1ab527 commit 2def475

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

scripts/build/check_init_priorities.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,14 @@ def _process_initlevels(self):
202202
raise ValueError(f"no symbol at addr {addr:08x}")
203203
obj, size, shidx = self._objects[addr]
204204

205-
arg0_name = self._object_name(self._initlevel_pointer(addr, 0, shidx))
206-
arg1_name = self._object_name(self._initlevel_pointer(addr, 1, shidx))
205+
arg_name = self._object_name(self._initlevel_pointer(addr, 0, shidx))
207206

208-
self.initlevels[level].append(f"{obj}: {arg0_name}({arg1_name})")
207+
self.initlevels[level].append(f"{obj}: {arg_name}")
209208

210-
ordinal = self._device_ord_from_name(arg1_name)
209+
ordinal = self._device_ord_from_name(arg_name)
211210
if ordinal:
212211
prio = Priority(level, priority)
213-
self.devices[ordinal] = (prio, arg0_name)
212+
self.devices[ordinal] = prio
214213

215214
addr += size
216215
priority += 1
@@ -256,8 +255,8 @@ def _check_dep(self, dev_ord, dep_ord):
256255
self.log.info(f"Ignoring priority: {dev_node._binding.compatible}")
257256
return
258257

259-
dev_prio, dev_init = self._obj.devices.get(dev_ord, (None, None))
260-
dep_prio, dep_init = self._obj.devices.get(dep_ord, (None, None))
258+
dev_prio = self._obj.devices.get(dev_ord, None)
259+
dep_prio = self._obj.devices.get(dep_ord, None)
261260

262261
if not dev_prio or not dep_prio:
263262
return
@@ -272,12 +271,12 @@ def _check_dep(self, dev_ord, dep_ord):
272271
"the devicetree dependencies.")
273272
self.errors += 1
274273
self.log.error(
275-
f"{dev_node.path} <{dev_init}> is initialized before its dependency "
276-
f"{dep_node.path} <{dep_init}> ({dev_prio} < {dep_prio})")
274+
f"{dev_node.path} is initialized before its dependency "
275+
f"{dep_node.path} ({dev_prio} < {dep_prio})")
277276
else:
278277
self.log.info(
279-
f"{dev_node.path} <{dev_init}> {dev_prio} > "
280-
f"{dep_node.path} <{dep_init}> {dep_prio}")
278+
f"{dev_node.path} {dev_prio} > "
279+
f"{dep_node.path} {dep_prio}")
281280

282281
def check_edt(self):
283282
"""Scan through all known devices and validate the init priorities."""

0 commit comments

Comments
 (0)