From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
Caleb Connolly <caleb.connolly@linaro.org>,
Rasmus Villemoes <ravi@prevas.dk>, Stefan Roese <sr@denx.de>,
Sughosh Ganu <sughosh.ganu@linaro.org>
Subject: Re: [PATCH v2 01/18] abuf: Add a helper for initing and allocating a buffer
Date: Mon, 5 May 2025 14:38:10 -0600 [thread overview]
Message-ID: <20250505203810.GM5430@bill-the-cat> (raw)
In-Reply-To: <20250501133726.2627373-2-sjg@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]
On Thu, May 01, 2025 at 07:37:01AM -0600, Simon Glass wrote:
> This construct appears in various places. Reduce code size by adding a
> function for it.
>
> It inits the abuf, then allocates it to the requested size.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
> - Add new patch with a helper for initing and allocating a buffer
>
> boot/cedit.c | 3 +--
> boot/scene.c | 3 +--
> boot/scene_textline.c | 3 +--
> include/abuf.h | 11 +++++++++++
> lib/abuf.c | 9 +++++++++
> lib/of_live.c | 3 +--
> test/lib/abuf.c | 22 ++++++++++++++++++++++
> 7 files changed, 46 insertions(+), 8 deletions(-)
This just made me look again at the abuf implementation itself and
become filled with regret I didn't reject it back in 2021. We're
introducing wrappers around standard functions and calling conventions /
patterns with something homegrown (and so not intuitive to others) that
mainly hides the "sysmem" challenge we also have and I wish you were
interested in revisiting how that part of sandbox works instead. And
even if this is a better design, for the sake of argument, it's not
something everyone else is used to. And that's important.
If we *really* need something different / new here, I'd rather see us go
and wrap common/dlmalloc.c with kmalloc/kfree/etc and so give people
something even more familiar-looking.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2025-05-05 20:38 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-01 13:37 [PATCH v2 00/18] bootstd: Useability improvements Simon Glass
2025-05-01 13:37 ` [PATCH v2 01/18] abuf: Add a helper for initing and allocating a buffer Simon Glass
2025-05-05 20:38 ` Tom Rini [this message]
2025-05-06 13:23 ` Simon Glass
2025-05-06 19:48 ` Tom Rini
2025-05-10 11:27 ` Simon Glass
2025-05-12 22:35 ` Tom Rini
2025-05-14 19:44 ` Simon Glass
2025-05-24 7:51 ` Simon Glass
2025-05-24 14:20 ` Tom Rini
2025-05-24 14:31 ` Simon Glass
2025-05-24 14:35 ` Tom Rini
2025-05-01 13:37 ` [PATCH v2 02/18] fs: boot: Update fs_read_alloc() to use abuf Simon Glass
2025-05-01 13:37 ` [PATCH v2 03/18] fs: boot: Update fs_load_alloc() " Simon Glass
2025-05-01 13:37 ` [PATCH v2 04/18] fs: boot: Update bootmeth_alloc_other() " Simon Glass
2025-05-01 13:37 ` [PATCH v2 05/18] bootstd: Add more debugging to bootmeth_efi Simon Glass
2025-05-01 13:37 ` [PATCH v2 06/18] bootstd: Add more debugging to bootmeth_extlinux Simon Glass
2025-05-01 13:37 ` [PATCH v2 07/18] bootstd: Try all bootmeths on the final partition Simon Glass
2025-05-01 13:37 ` [PATCH v2 08/18] bootstd: Fully complete iteration of a uclass Simon Glass
2025-05-01 13:37 ` [PATCH v2 09/18] test/py: Split out core of Fedora image into a new function Simon Glass
2025-05-01 13:37 ` [PATCH v2 10/18] test/py: Add an extlinux file similar to Ubuntu Simon Glass
2025-05-01 13:37 ` [PATCH v2 11/18] usb: Use more useful names for block devices Simon Glass
2025-05-01 13:37 ` [PATCH v2 12/18] sandbox: Use a unique name for each USB controller Simon Glass
2025-05-01 13:37 ` [PATCH v2 13/18] bootstd: Tweak scanning with labels Simon Glass
2025-05-01 13:37 ` [PATCH v2 14/18] bootstd: Tidy up a nested CONFIG_IS_ENABLED(BOOTSTD) Simon Glass
2025-05-01 13:37 ` [PATCH v2 15/18] bootstd: Provide a command to select the bootdev order Simon Glass
2025-05-05 8:34 ` Quentin Schulz
2025-05-05 15:37 ` Simon Glass
2025-05-05 16:41 ` Tom Rini
2025-05-06 13:24 ` Simon Glass
2025-05-01 13:37 ` [PATCH v2 16/18] bootstd: Correct the comment for bootmeth_set_order() Simon Glass
2025-05-01 13:37 ` [PATCH v2 17/18] bootstd: Expand debugging in bootdev_find_in_blk() Simon Glass
2025-05-01 13:37 ` [PATCH v2 18/18] bootstd: Mention FS state in bootmeth_read_bootflow() Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250505203810.GM5430@bill-the-cat \
--to=trini@konsulko.com \
--cc=caleb.connolly@linaro.org \
--cc=ravi@prevas.dk \
--cc=sjg@chromium.org \
--cc=sr@denx.de \
--cc=sughosh.ganu@linaro.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.