From: Ahmad Fatoum <a.fatoum@barebox.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/5] blspec: sort entries according to specification
Date: Mon, 23 Feb 2026 12:08:42 +0100 [thread overview]
Message-ID: <286d9d1a-7349-4fef-a65e-d2e70f9031d9@barebox.org> (raw)
In-Reply-To: <aZw0qQVz1mX1l8nV@pengutronix.de>
Hello Sascha,
On 2/23/26 12:06 PM, Sascha Hauer wrote:
> On Mon, Feb 09, 2026 at 10:08:52AM +0100, Ahmad Fatoum wrote:
>> +static int blspec_compare(struct list_head *list_a, struct list_head *list_b)
>> +{
>> + struct bootentry *be_a = container_of(list_a, struct bootentry, list);
>> + struct bootentry *be_b = container_of(list_b, struct bootentry, list);
>> + struct blspec_entry *a, *b;
>> + const char *a_version, *b_version;
>> + int r;
>> +
>> + /* The boot entry providers are called one by one and passed an empty
>> + * list that's aggregated later, so we should only be encountering
>> + * bootloader spec entries here.
>> + */
>> + DEBUG_ASSERT(is_blspec_entry(be_a) && is_blspec_entry(be_b));
[sni[]
>> +
>> +#ifdef DEBUG
>> +#define DEBUG_ASSERT(expr) BUG_ON(!(expr))
>> +#else
>> +#define DEBUG_ASSERT(expr) ((void)(expr))
>> +#endif
>
> Is this change intentional here?
Yes, DEBUG_ASSERT is used within this patch.
Cheers,
Ahmad
>
> Sascha
>
>> +
>> #endif
>> diff --git a/include/boot.h b/include/boot.h
>> index e6309b65a0c3..fdc108b7a21d 100644
>> --- a/include/boot.h
>> +++ b/include/boot.h
>> @@ -24,6 +24,8 @@ struct bootentry {
>> };
>>
>> int bootentries_add_entry(struct bootentries *entries, struct bootentry *entry);
>> +void bootentries_add_entry_sorted(struct bootentries *entries, struct bootentry *entry,
>> + int (*compare)(struct list_head *, struct list_head *));
>>
>> struct bootentry_provider {
>> const char *name;
>> --
>> 2.47.3
>>
>>
>>
>
next prev parent reply other threads:[~2026-02-23 11:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-09 9:08 [PATCH 0/5] " Ahmad Fatoum
2026-02-09 9:08 ` [PATCH 1/5] boot: aggregate bootentry provider entries one by one Ahmad Fatoum
2026-02-09 9:08 ` [PATCH 2/5] blspec: sort entries according to specification Ahmad Fatoum
2026-02-23 11:06 ` Sascha Hauer
2026-02-23 11:08 ` Ahmad Fatoum [this message]
2026-02-09 9:08 ` [PATCH 3/5] boot: give struct bootentry a path member Ahmad Fatoum
2026-02-09 9:08 ` [PATCH 4/5] commands: boot: support file path in boot -M for default entry Ahmad Fatoum
2026-02-09 9:08 ` [PATCH 5/5] test: self: add bootloader spec files test Ahmad Fatoum
2026-02-23 11:11 ` [PATCH 0/5] blspec: sort entries according to specification Sascha Hauer
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=286d9d1a-7349-4fef-a65e-d2e70f9031d9@barebox.org \
--to=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox