From patchwork Fri Jan 9 23:11:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1407 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768000385; bh=R5OrEtSpdapwRQaAu2NIMb++y//LNCWTqwteraININI=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=OUZHv7caA3WpRUAoNoqgFdoykzzOCJbmTUlioqawYcOwvU3i0L5gCBvTLzFz+XtlH 0/+yFojYBnPHs8TsmGp6uIMBo0zzjpNYTK1/XakXtXnNrpfpwicW6kL/4zvqO1QaVo DTr71WSt+6/kMyMKXJ/Mw1ZGvBWTBq/ekwJYn67P+XWUsc3RRCby/iIlW2OdRk6ekI QwctKSoy9EmSiiUMkBLNA82rxOAV62gSSoow6qjjVZKlVKIY3KfJpwVwd/UvZmrYp3 wq3Gpiler5FgOUrVz71wf4ijPp+B6V/+0W37824CGrHp65OjkOfhz3ARbGRlbzotBu i42XwgaWUuXBA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 536C569240 for ; Fri, 9 Jan 2026 16:13:05 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id bj1n9JViG7in for ; Fri, 9 Jan 2026 16:13:05 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768000385; bh=R5OrEtSpdapwRQaAu2NIMb++y//LNCWTqwteraININI=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=OUZHv7caA3WpRUAoNoqgFdoykzzOCJbmTUlioqawYcOwvU3i0L5gCBvTLzFz+XtlH 0/+yFojYBnPHs8TsmGp6uIMBo0zzjpNYTK1/XakXtXnNrpfpwicW6kL/4zvqO1QaVo DTr71WSt+6/kMyMKXJ/Mw1ZGvBWTBq/ekwJYn67P+XWUsc3RRCby/iIlW2OdRk6ekI QwctKSoy9EmSiiUMkBLNA82rxOAV62gSSoow6qjjVZKlVKIY3KfJpwVwd/UvZmrYp3 wq3Gpiler5FgOUrVz71wf4ijPp+B6V/+0W37824CGrHp65OjkOfhz3ARbGRlbzotBu i42XwgaWUuXBA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 408336923A for ; Fri, 9 Jan 2026 16:13:05 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768000383; bh=L3iqycogUmfLAwltuS4hCFaguhneYEstB13iwThFx48=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oJDXo7YuUG+eqVtbP9xe4I1QH9Rr4BrOcU3yeIQxL3DFeC3v6p4QvoL83ZFTP6gKM 97pMtfza3LriOfN2i50d/TCM460U6RMioXc1EmQVHHB5s/TrcYKX4Nb2pD+sVyVqVs ZRiZN+t1G+TGUyn7x7oNgaIgUuSsAUH3FPillMI7J5rFRhh8Zlh0n7aBtxJntS3MW3 Ly8BKsV7Ltb62TmjBx7QO5VDv/VaAnGJ2PWKJn6g7sMd20cZDMtIGy2miwRse0ZGDU Jen4TvUrR9vcO5wYGzzV21v63jBnuQsbLGa3kfVEtBkrSS9OMTAu4fWgK6oX5C8vjE ik3oelpUgDyUA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 40AFB6923A; Fri, 9 Jan 2026 16:13:03 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id Hfsxis16Znjf; Fri, 9 Jan 2026 16:13:03 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768000378; bh=WTtp2rlM0bQZRGTI7EJHZ5Q6aT6VIskmazXkGlVtDGc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gylSbMOAkbtQ2Xn+3j1ngSVUQjwW4KAWDtObeu/j8LkUoekSQ8zqUTxYrXk7UPur9 U+w9Ixyy3hOD4j5e4EpwykxRgR6yq3Khq+gG6GfNlZvxmg0VC7OlJ8MSMSP/vLuARl VY+uq/Ooe3grl+M/Bby4L5X4xKfKc6V6wyyrCVHBaKa7K/bqgTEBp6JdHipjh8iPn2 UuRsfRidxSvBLy9Dhj6XbSzqgFPbzRJxI6i7cKQ3aGgor1vmpMmDVscFPx7e6r1Ltr fXPZkU+kszndCseZCYjRlPjMeEVb9ROEuKkim6xHyTAvJcUX1KrEedT/10u4gYPPhN 4NEx8Q6LJ0LLg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 5CE3269206; Fri, 9 Jan 2026 16:12:58 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 9 Jan 2026 16:11:20 -0700 Message-ID: <20260109231151.4056804-12-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260109231151.4056804-1-sjg@u-boot.org> References: <20260109231151.4056804-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: QV4JS5V3RWZWU3RC6VSHNLH6N6D4OSIU X-Message-ID-Hash: QV4JS5V3RWZWU3RC6VSHNLH6N6D4OSIU X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 11/32] boot: pxe: Rename destroy_pxe_menu() to pxe_menu_uninit() List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Use a consistent naming convention with the pxe_ prefix. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- boot/pxe_utils.c | 6 +++--- include/pxe_utils.h | 6 +++--- test/boot/pxe.c | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index 1516065a467..a824b1b5623 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -900,7 +900,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) return 1; } -void destroy_pxe_menu(struct pxe_menu *cfg) +void pxe_menu_uninit(struct pxe_menu *cfg) { struct list_head *pos, *n; struct pxe_label *label; @@ -946,7 +946,7 @@ struct pxe_menu *parse_pxefile(struct pxe_context *ctx, unsigned long menucfg) unmap_sysmem(buf); if (r < 0) { - destroy_pxe_menu(cfg); + pxe_menu_uninit(cfg); return NULL; } @@ -1192,7 +1192,7 @@ int pxe_process(struct pxe_context *ctx, ulong pxefile_addr_r, bool prompt) handle_pxe_menu(ctx, cfg); - destroy_pxe_menu(cfg); + pxe_menu_uninit(cfg); return 0; } diff --git a/include/pxe_utils.h b/include/pxe_utils.h index c0d2167cc25..0de2f49aab5 100644 --- a/include/pxe_utils.h +++ b/include/pxe_utils.h @@ -179,13 +179,13 @@ struct pxe_context { }; /** - * destroy_pxe_menu() - Destroy an allocated pxe structure + * pxe_menu_uninit() - Destroy an allocated pxe structure * * Free the memory used by a pxe_menu and its labels * * @cfg: Config to destroy, previous returned from parse_pxefile() */ -void destroy_pxe_menu(struct pxe_menu *cfg); +void pxe_menu_uninit(struct pxe_menu *cfg); /** * get_pxe_file() - Read a file @@ -243,7 +243,7 @@ void handle_pxe_menu(struct pxe_context *ctx, struct pxe_menu *cfg); * Returns NULL if there is an error, otherwise, returns a pointer to a * pxe_menu struct populated with the results of parsing the pxe file (and any * files it includes). The resulting pxe_menu struct can be free()'d by using - * the destroy_pxe_menu() function. + * the pxe_menu_uninit() function. */ struct pxe_menu *parse_pxefile(struct pxe_context *ctx, ulong menucfg); diff --git a/test/boot/pxe.c b/test/boot/pxe.c index 4ac0d6c6fa6..8d7c6f7f2ae 100644 --- a/test/boot/pxe.c +++ b/test/boot/pxe.c @@ -286,7 +286,7 @@ static int pxe_test_parse_norun(struct unit_test_state *uts) ut_assert_console_end(); /* Clean up */ - destroy_pxe_menu(cfg); + pxe_menu_uninit(cfg); pxe_destroy_ctx(&ctx); return 0; @@ -476,7 +476,7 @@ static int pxe_test_fdtdir_norun(struct unit_test_state *uts) env_set("soc", NULL); env_set("board", NULL); - destroy_pxe_menu(cfg); + pxe_menu_uninit(cfg); pxe_destroy_ctx(&ctx); return 0; @@ -595,7 +595,7 @@ static int pxe_test_errors_norun(struct unit_test_state *uts) /* Clean up */ env_set("fdtfile", NULL); - destroy_pxe_menu(cfg); + pxe_menu_uninit(cfg); pxe_destroy_ctx(&ctx); return 0; @@ -681,7 +681,7 @@ static int pxe_test_overlay_no_addr_norun(struct unit_test_state *uts) ut_assert_console_end(); /* Clean up */ - destroy_pxe_menu(cfg); + pxe_menu_uninit(cfg); pxe_destroy_ctx(&ctx); return 0; @@ -1151,7 +1151,7 @@ static int pxe_test_alloc_norun(struct unit_test_state *uts) ut_asserteq(false, ctx.fake_go); /* Clean up */ - destroy_pxe_menu(ctx.cfg); + pxe_menu_uninit(ctx.cfg); pxe_destroy_ctx(&ctx); ut_assertok(env_set("pxe_timeout", NULL)); ut_assertok(env_set("fdt_addr", orig_fdt_addr)); @@ -1245,7 +1245,7 @@ static int pxe_test_fit_embedded_fdt_norun(struct unit_test_state *uts) ut_asserteq(0, ctx.conf_fdt); /* Clean up */ - destroy_pxe_menu(cfg); + pxe_menu_uninit(cfg); pxe_destroy_ctx(&ctx); return 0;