From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/2] bootsource: retire bootsource_set_alias_name
Date: Wed, 9 Apr 2025 15:19:25 +0200 [thread overview]
Message-ID: <20250409131926.1949805-1-a.fatoum@pengutronix.de> (raw)
This function was never used in upstream board code since it was
introduced, so drop it.
This avoids it interfering with the addition of bootsource_of_node_set
in the follow-up commit.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/bootsource.c | 14 --------------
include/bootsource.h | 1 -
2 files changed, 15 deletions(-)
diff --git a/common/bootsource.c b/common/bootsource.c
index e78237ff36b8..14e6565e3789 100644
--- a/common/bootsource.c
+++ b/common/bootsource.c
@@ -32,7 +32,6 @@ static const char *bootsource_str[BOOTSOURCE_MAX] = {
static enum bootsource bootsource = BOOTSOURCE_UNKNOWN;
static int bootsource_instance = BOOTSOURCE_INSTANCE_UNKNOWN;
-const char *bootsource_alias_name = NULL;
const char *bootsource_to_string(enum bootsource src)
{
@@ -84,14 +83,6 @@ const char *bootsource_get_alias_name(void)
const char *stem;
int ret;
- /*
- * If alias name was overridden via
- * bootsource_set_alias_name() return that value without
- * asking any questions.
- */
- if (bootsource_alias_name)
- return bootsource_alias_name;
-
stem = bootsource_get_alias_stem(bootsource);
if (!stem)
return NULL;
@@ -140,11 +131,6 @@ struct cdev *bootsource_of_cdev_find(void)
return cdev;
}
-void bootsource_set_alias_name(const char *name)
-{
- bootsource_alias_name = name;
-}
-
void bootsource_set_raw(enum bootsource src, int instance)
{
if (src >= BOOTSOURCE_MAX)
diff --git a/include/bootsource.h b/include/bootsource.h
index c9c58daf096c..1b3df84f4ddb 100644
--- a/include/bootsource.h
+++ b/include/bootsource.h
@@ -28,7 +28,6 @@ enum bootsource {
enum bootsource bootsource_get(void);
enum bootsource bootsource_get_device(void);
int bootsource_get_instance(void);
-void bootsource_set_alias_name(const char *name);
const char *bootsource_get_alias_name(void);
const char *bootsource_to_string(enum bootsource src);
const char *bootsource_get_alias_stem(enum bootsource bs);
--
2.39.5
next reply other threads:[~2025-04-09 14:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 13:19 Ahmad Fatoum [this message]
2025-04-09 13:19 ` [PATCH 2/2] bootsource: add optional read of /chosen/bootsource Ahmad Fatoum
2025-04-10 6:34 ` [PATCH 1/2] bootsource: retire bootsource_set_alias_name 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=20250409131926.1949805-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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