From: Rasmus Villemoes <ravi@prevas.dk>
To: u-boot@lists.denx.de
Cc: Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>,
Rasmus Villemoes <ravi@prevas.dk>
Subject: [PATCH] linker_lists.h: drop never used ll_start, ll_end macros
Date: Mon, 23 Mar 2026 09:39:28 +0100 [thread overview]
Message-ID: <20260323083928.1928856-1-ravi@prevas.dk> (raw)
These macros have AFAICT never been used at all. It's also far from
clear what purpose it could serve - for one thing, what _type would
one pass, other than void perhaps? The example using "struct
my_sub_cmd" seems misplaced, as how could one know that the first
linker list consists of those, and moreover, how would one know how
many there are?
The linker list concept is fragile enough on its own, there is no need
to have unused functionality lying around that may or may not bitrot
and certainly will confuse readers of linker_lists.h.
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
---
include/linker_lists.h | 50 ------------------------------------------
1 file changed, 50 deletions(-)
diff --git a/include/linker_lists.h b/include/linker_lists.h
index 0f4a2d686e2..78ba937c8c3 100644
--- a/include/linker_lists.h
+++ b/include/linker_lists.h
@@ -288,56 +288,6 @@
#define ll_entry_ref(_type, _name, _list) \
((_type *)&_u_boot_list_2_##_list##_2_##_name)
-/**
- * ll_start() - Point to first entry of first linker-generated array
- * @_type: Data type of the entry
- *
- * This function returns ``(_type *)`` pointer to the very first entry of
- * the very first linker-generated array.
- *
- * Since this macro defines the start of the linker-generated arrays,
- * its leftmost index must be 1.
- *
- * Example:
- *
- * ::
- *
- * struct my_sub_cmd *msc = ll_start(struct my_sub_cmd);
- */
-#define ll_start(_type) \
-({ \
- static char start[0] __aligned(4) __attribute__((unused)) \
- __section("__u_boot_list_1"); \
- _type * tmp = (_type *)&start; \
- asm("":"+r"(tmp)); \
- tmp; \
-})
-
-/**
- * ll_end() - Point after last entry of last linker-generated array
- * @_type: Data type of the entry
- *
- * This function returns ``(_type *)`` pointer after the very last entry of
- * the very last linker-generated array.
- *
- * Since this macro defines the end of the linker-generated arrays,
- * its leftmost index must be 3.
- *
- * Example:
- *
- * ::
- *
- * struct my_sub_cmd *msc = ll_end(struct my_sub_cmd);
- */
-#define ll_end(_type) \
-({ \
- static char end[0] __aligned(4) __attribute__((unused)) \
- __section("__u_boot_list_3"); \
- _type * tmp = (_type *)&end; \
- asm("":"+r"(tmp)); \
- tmp; \
-})
-
#endif /* __ASSEMBLY__ */
#endif /* __LINKER_LISTS_H__ */
--
2.53.0
next reply other threads:[~2026-03-23 8:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 8:39 Rasmus Villemoes [this message]
2026-04-02 20:24 ` [PATCH] linker_lists.h: drop never used ll_start, ll_end macros Simon Glass
2026-04-07 19:50 ` Tom Rini
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=20260323083928.1928856-1-ravi@prevas.dk \
--to=ravi@prevas.dk \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox