This function is very long. Put the inner loop in a separate function to enhance readability. Signed-off-by: Simon Glass <sjg at chromium.org> --- tools/dtoc/dtb_platdata.py | 89 +++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 40 deletions(-) Applied to u-boot-dm, thanks!