diff options
| author | Tom Rini <[email protected]> | 2026-06-02 09:30:33 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-06-02 09:30:33 -0600 |
| commit | b5f2880261e968e031db6f85e549b1a6ea35e8c8 (patch) | |
| tree | 95f240d4291b1c923cbd14d56502b32a470c7c27 /boot/bootdev-uclass.c | |
| parent | 0a46055d96ac627c05180cdeaa187a9fdf6b7973 (diff) | |
| parent | 5ab1600213608129ea63fc3046f46349515821d6 (diff) | |
Merge patch series "Clean up bloblist initialization"
Tom Rini <[email protected]> says:
This series does a few small but important cleanups to how we check for,
and initialize a bloblist. The first thing is that the way things are
done today, our HANDOFF code can only work with a fixed bloblist
location, so express that requirement in Kconfig. Next, we demote the
scary message about "Bloblist at ... not found" to a debug because we
most often see that because the bloblist doesn't (and can't) exist yet.
Finally, we remove bloblist_maybe_init and split this in to an exists
and a real init. This results in practically no growth (between 8 bytes
growth to 12 bytes saved, with some outliers saving much more thanks to
knowing it's impossible to have been passed a bloblist yet). This also
cleans up some of the code around checking for / knowing about a
bloblist existing.
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'boot/bootdev-uclass.c')
| -rw-r--r-- | boot/bootdev-uclass.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 3f8dc2c3c4e..657804949f8 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -566,13 +566,18 @@ int bootdev_get_bootflow(struct udevice *dev, struct bootflow_iter *iter, { const struct bootdev_ops *ops = bootdev_get_ops(dev); - log_debug("->get_bootflow %s,%x=%p\n", dev->name, iter->part, - ops->get_bootflow); bootflow_init(bflow, dev, iter->method); - if (!ops->get_bootflow) - return default_get_bootflow(dev, iter, bflow); - return ops->get_bootflow(dev, iter, bflow); + if (ops && ops->get_bootflow) { + log_debug("->get_bootflow %s,%x=%p\n", dev->name, iter->part, + ops->get_bootflow); + + return ops->get_bootflow(dev, iter, bflow); + } + + log_debug("->get_bootflow %s,%x is unset\n", dev->name, iter->part); + + return default_get_bootflow(dev, iter, bflow); } int bootdev_next_label(struct bootflow_iter *iter, struct udevice **devp, |
