{"id":2235254,"url":"http://patchwork.ozlabs.org/api/1.2/covers/2235254/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/cover/20260508213217.3807786-1-aristo.chen@canonical.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.2/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260508213217.3807786-1-aristo.chen@canonical.com>","list_archive_url":null,"date":"2026-05-08T21:31:58","name":"[v1,0/3] boot/fit: use fdt_for_each_subnode() in image-fit.c","submitter":{"id":92721,"url":"http://patchwork.ozlabs.org/api/1.2/people/92721/?format=json","name":"Aristo Chen","email":"aristo.chen@canonical.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/cover/20260508213217.3807786-1-aristo.chen@canonical.com/mbox/","series":[{"id":503465,"url":"http://patchwork.ozlabs.org/api/1.2/series/503465/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=503465","date":"2026-05-08T21:31:58","name":"boot/fit: use fdt_for_each_subnode() in image-fit.c","version":1,"mbox":"http://patchwork.ozlabs.org/series/503465/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2235254/comments/","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (4096-bit key;\n unprotected) header.d=canonical.com header.i=@canonical.com\n header.a=rsa-sha256 header.s=20251003 header.b=JX24KLB4;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=canonical.com","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (4096-bit key;\n unprotected) header.d=canonical.com header.i=@canonical.com\n header.b=\"JX24KLB4\";\n\tdkim-atps=neutral","phobos.denx.de; dmarc=pass (p=reject dis=none)\n header.from=canonical.com","phobos.denx.de;\n spf=pass smtp.mailfrom=aristo.chen@canonical.com"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gC6dg3KdFz1yCg\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 10:42:31 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id B5DA084E28;\n\tSat,  9 May 2026 02:40:20 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id D292084CF1; Fri,  8 May 2026 23:32:37 +0200 (CEST)","from smtp-relay-internal-0.canonical.com\n (smtp-relay-internal-0.canonical.com [185.125.188.122])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id DA86A84CE5\n for <u-boot@lists.denx.de>; Fri,  8 May 2026 23:32:35 +0200 (CEST)","from mail-pf1-f200.google.com (mail-pf1-f200.google.com\n [209.85.210.200])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 862F63FEBC\n for <u-boot@lists.denx.de>; Fri,  8 May 2026 21:32:35 +0000 (UTC)","by mail-pf1-f200.google.com with SMTP id\n d2e1a72fcca58-82fa6c3a77cso1653045b3a.3\n for <u-boot@lists.denx.de>; Fri, 08 May 2026 14:32:35 -0700 (PDT)","from noble-uboot.tail872496.ts.net\n (124-218-37-86.cm.dynamic.apol.com.tw. [124.218.37.86])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-83962e7e3fcsm16196751b3a.0.2026.05.08.14.32.31\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 08 May 2026 14:32:32 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com;\n s=20251003; t=1778275955;\n bh=axynfVotHajRHk0PEAyKEmbt+sNEM+EclROkiy3hfr4=;\n h=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=JX24KLB4mUFCFx1Ir7Bzias4zb7zbYN7Jy/P9q7U08pnY0vH7TiFVf6LUiwvVjtCZ\n CI2WXY+aw4IUCwX98rcIDrHSJecwDZ4myknYC2qXOXB5DMN8z2o+Aloy3InlS9Wuoe\n RALFlQdNtRGHsIgcp+o65ZPxrzAzHV7jSM/S6QORqE6MAn9lzm3f5XFa/zFC11KgDe\n Wwpg+2H1rytVee8iUjXznC1GOj5AlBSv3T76PzIalenXwNQYuLQNfU08765os10ZUn\n M5EbNylwz9Gw72c8W3rbWc4ZV6EUoGanBZmWf9rU10efmWK/m/aXWQnJjIJoJZSDRt\n KgZsu+XPOBX0kH6oGH+WCNlJyx+ccM7Ud5LHAStMqMgcClVVIEyOhsD/UqBjBEizbq\n ef9H0QyWbSvJNDREUqnJ/HQHZyEFT3kPtt2NRYCo33kvYh2qA2TiXuSt3SsNyUbJ1c\n TTnS9GXDS264dCeZDawpI9AzNvypDQIkFev8Uo4m1vrJh7qte88UMg2bu4g0hO686+\n WLuQgcBIl7ddmh8GcfzGqJ/lffA1RoJGJ4AeIXdj4iMshgKGOoDIZg+hvSD6roFSAf\n lN8saph2j9CwyJ0q2GOZBXsnmfEMPJGZ1HLwrDaXHa07dopWJ0DN8Ip2zhVEvAxiu2\n EM7fhk7XT5Dq08WzW4Rt5t4k=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1778275953; x=1778880753;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=axynfVotHajRHk0PEAyKEmbt+sNEM+EclROkiy3hfr4=;\n b=ZNxAPvEgyduSnSfudZRYJgBuIhhKKZJ8M2S3WUwd/K9zEHrNaKj1uRdnWTWEHyvaJF\n vjkCeGj1dPu9IzabUZh/j9Xbvzx9I8XBMU/etLqIkpGPaca3nhl+uIMJX01YctbcmtpG\n xz0cnTy/O9ZM9kb/y/D3YGp/rDkwYsGcfLRl4FtTzwGzr+beq+fCY79g5QgSdVa3mbdT\n DotIy84D0cWEu7fufcCsPxBwzYl3CL+CPRl5yLCUQPMG9TeTS3w456YYxsGvdYMoft/S\n Hyd1/O5LfeJ37MF49k16AGNbUybqteDZfXhWoQeCIrnmB6t9WKR4hBa+5C1iQgBzEYSc\n h3fw==","X-Gm-Message-State":"AOJu0YxTIT7/o4dAJoxuS/JiM8wyBG8K7Wq+Hcx8RrCQh5xg7MnqgsMu\n OvSsEDjl7fGaZlOZRblDPyJ7K9v19N+jJzx6c1G+u5d2LrMPLzS8AAGUXhU3RsJXj3EFlD+LzSv\n hu62oriwuFHxnfCJaRgQ+zTYNc+/oSb/g0L3oHdh4oEaqLehVKmqHPTrK9bO+wTaotXZl+Ump8s\n /fsYCatg==","X-Gm-Gg":"Acq92OGykEPqBa66eneIcuSwXdP5Nmj1aL6DK2z2DGD2x+0lb2d9sVVeecDb9ZG3XOP\n ga5vqFqhQvQ8jaTeNLrnSATygMqoZyOwHmvdA8FM52x/E8d8YmJX0/7TMVPH5GzwEqI1zVF/kl1\n cPzasLUIDJaWcFGWw2CGujbS10VaDHGGU3azlJ2txwIcXAYOIsnolBEBwOoXIH17zOegknjcxJd\n 1OKBg28x/uvsVRvtMhJhmxDLAIU1uM1dz/59X6ib3E2qHOqd1L1hrEG1Bzx1lEiUBbBgNFc8mH/\n m7GRmyDdUoHsH1eci7QQD4ZyvsdWH5VAhwizTdYRPxxlxYI0rQEL9XlNXfW2A3fEi2NkGC2I6Fi\n 5/0stqDl20dMYVLM0G1eciDVKjWbD8R+PXe8M/WLj1m0iohMkmhSabbpIGBerzKdrk2qSC+q8vO\n 8+HuoHHpQpXBnWgyk=","X-Received":["by 2002:a05:6a00:aa82:b0:837:6bb9:acb7 with SMTP id\n d2e1a72fcca58-83cf1e48de4mr4689503b3a.0.1778275953309;\n Fri, 08 May 2026 14:32:33 -0700 (PDT)","by 2002:a05:6a00:aa82:b0:837:6bb9:acb7 with SMTP id\n d2e1a72fcca58-83cf1e48de4mr4689487b3a.0.1778275952883;\n Fri, 08 May 2026 14:32:32 -0700 (PDT)"],"From":"Aristo Chen <aristo.chen@canonical.com>","To":"u-boot@lists.denx.de","Cc":"Aristo Chen <aristo.chen@canonical.com>","Subject":"[PATCH v1 0/3] boot/fit: use fdt_for_each_subnode() in image-fit.c","Date":"Fri,  8 May 2026 21:31:58 +0000","Message-ID":"<20260508213217.3807786-1-aristo.chen@canonical.com>","X-Mailer":"git-send-email 2.43.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Mailman-Approved-At":"Sat, 09 May 2026 02:40:19 +0200","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"},"content":"This series ends with replacing the verbose fdt_next_node() + ndepth\nidiom in boot/image-fit.c with fdt_for_each_subnode(), bringing the\nfile in line with boot/image-fit-sig.c. Six of the seven sites in\nimage-fit.c predate the macro by 2-6 years; the seventh was\ncopy-pasted from a neighbour in 2015 just after the macro landed.\nThe old idiom is legacy, not a deliberate technical choice.\n\nConverting straight to the macro turned out to need a prerequisite,\nwhich is patch 1. fit_print_contents() reads the default-config\nproperty using the loop variable left over after iterating /images\nchildren. With /images defined first in the source (the conventional\nlayout) libfdt's walker happens to leave that variable pointing at\n/configurations and the read works. With /configurations defined\nfirst the read returns NULL and the \"Default Configuration\" line is\nsilently omitted. fdt_for_each_subnode()'s post-loop value is\nunconditionally a negative error code, so a naive conversion would\nhave made the missing line the unconditional behaviour. Patch 1\nreads the property from confs_noffset directly and removes the\nlayout dependency.\n\nPatch 2 adds a regression test for the configs-before-images\nlayout, which had no coverage. \n\nPatch 3 is the mechanical conversion at all seven sites,\nequivalence-preserving as described in the per-patch message.\n\nAristo Chen (3):\n  boot/fit: read default-config property from the configurations node\n  test: fit: regression test for default-config print with reversed node\n    order\n  boot/fit: use fdt_for_each_subnode() in image-fit.c\n\n boot/image-fit.c          | 109 ++++++++++----------------------------\n test/py/tests/test_fit.py |  53 ++++++++++++++++++\n 2 files changed, 81 insertions(+), 81 deletions(-)"}