Skip to content

Commit b7940c6

Browse files
committed
gen_defines.py: remove c++ unfriendly inline comments
1 parent dacede6 commit b7940c6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: scripts/dts/gen_defines.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -309,23 +309,23 @@ def write_ranges(node: edtlib.Node) -> None:
309309
idx_macro = f"{path_id}_RANGES_IDX_{i}_VAL_CHILD_BUS_FLAGS"
310310
idx_value = range.child_bus_addr >> ((range.child_bus_cells - 1) * 32)
311311
idx_vals.append((idx_macro,
312-
f"{idx_value} /* {hex(idx_value)} */"))
312+
f"{idx_value}"))
313313
if range.child_bus_addr is not None:
314314
idx_macro = f"{path_id}_RANGES_IDX_{i}_VAL_CHILD_BUS_ADDRESS"
315315
if "pcie" in node.buses:
316316
idx_value = range.child_bus_addr & ((1 << (range.child_bus_cells - 1) * 32) - 1)
317317
else:
318318
idx_value = range.child_bus_addr
319319
idx_vals.append((idx_macro,
320-
f"{idx_value} /* {hex(idx_value)} */"))
320+
f"{idx_value}"))
321321
if range.parent_bus_addr is not None:
322322
idx_macro = f"{path_id}_RANGES_IDX_{i}_VAL_PARENT_BUS_ADDRESS"
323323
idx_vals.append((idx_macro,
324-
f"{range.parent_bus_addr} /* {hex(range.parent_bus_addr)} */"))
324+
f"{range.parent_bus_addr}"))
325325
if range.length is not None:
326326
idx_macro = f"{path_id}_RANGES_IDX_{i}_VAL_LENGTH"
327327
idx_vals.append((idx_macro,
328-
f"{range.length} /* {hex(range.length)} */"))
328+
f"{range.length}"))
329329

330330
for macro, val in idx_vals:
331331
out_dt_define(macro, val)
@@ -351,7 +351,7 @@ def write_regs(node: edtlib.Node) -> None:
351351
if reg.addr is not None:
352352
idx_macro = f"{path_id}_REG_IDX_{i}_VAL_ADDRESS"
353353
idx_vals.append((idx_macro,
354-
f"{reg.addr} /* {hex(reg.addr)} */"))
354+
f"{reg.addr}"))
355355
if reg.name:
356356
name_vals.append((f"{path_id}_REG_NAME_{reg.name}_EXISTS", 1))
357357
name_macro = f"{path_id}_REG_NAME_{reg.name}_VAL_ADDRESS"
@@ -360,7 +360,7 @@ def write_regs(node: edtlib.Node) -> None:
360360
if reg.size is not None:
361361
idx_macro = f"{path_id}_REG_IDX_{i}_VAL_SIZE"
362362
idx_vals.append((idx_macro,
363-
f"{reg.size} /* {hex(reg.size)} */"))
363+
f"{reg.size}"))
364364
if reg.name:
365365
name_macro = f"{path_id}_REG_NAME_{reg.name}_VAL_SIZE"
366366
name_vals.append((name_macro, f"DT_{idx_macro}"))
@@ -715,7 +715,7 @@ def fmt_dep_list(dep_list):
715715
# Sort the list by dependency ordinal for predictability.
716716
sorted_list = sorted(dep_list, key=lambda node: node.dep_ordinal)
717717
return ("\\\n\t" + " \\\n\t"
718-
.join(f"{n.dep_ordinal}, /* {n.path} */"
718+
.join(f"{n.dep_ordinal},"
719719
for n in sorted_list))
720720
else:
721721
return "/* nothing */"
@@ -751,7 +751,7 @@ def prop2value(prop: edtlib.Property) -> edtlib.PropertyValType:
751751
return 1 if prop.val else 0
752752

753753
if prop.type in ["array", "uint8-array"]:
754-
return list2init(f"{val} /* {hex(val)} */" for val in prop.val)
754+
return list2init(f"{val}" for val in prop.val)
755755

756756
if prop.type == "string-array":
757757
return list2init(quote_str(val) for val in prop.val)

0 commit comments

Comments
 (0)